virt-manager, details: properly check for pool presence

commit 5e8f35f5e6 introduced this
problem.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2014-10-09 20:50:39 +02:00
parent 8f1aa5a4f0
commit 750eeaad98
1 changed files with 4 additions and 2 deletions

View File

@ -2586,9 +2586,11 @@ class vmmDetails(vmmGObjectUI):
size = "-"
else:
if source_pool:
pool = self.conn.get_pool(source_pool)
if pool:
try:
pool = self.conn.get_pool(source_pool)
vol = pool.get_volume(path)
except KeyError:
vol = None
else:
vol = self.conn.get_vol_by_path(path)