mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-27 14:03:57 +03:00
vmm: conn: Don't abuse path_definitely_exists for pool refreshing
Just catch any errors and continue on
This commit is contained in:
parent
6489df83ca
commit
66a8c5d374
@ -553,15 +553,15 @@ class vmmConnection(vmmGObject):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def get_vol_by_path(self, path):
|
def get_vol_by_path(self, path):
|
||||||
# path_exists will handle stuff like refreshing a busted pool
|
|
||||||
if not virtinst.VirtualDisk.path_definitely_exists(self.get_backend(),
|
|
||||||
path):
|
|
||||||
return None
|
|
||||||
|
|
||||||
for pool in self._pools.values():
|
for pool in self._pools.values():
|
||||||
for vol in pool.get_volumes().values():
|
for vol in pool.get_volumes().values():
|
||||||
if vol.get_target_path() == path:
|
try:
|
||||||
return vol
|
if vol.get_target_path() == path:
|
||||||
|
return vol
|
||||||
|
except Exception, e:
|
||||||
|
# Errors can happen if the volume disappeared, bug 1092739
|
||||||
|
logging.debug("Error looking up volume from path=%s: %s",
|
||||||
|
path, e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user