virt-manager/53615662-call-path_exists-before-getting-storage-volume.patch
Charles Arnold 78a202101a - Upstream bug fixes
535fb6f6-hide-scrollbar-until-something-scrollable.patch
  535fe0c2-fix-screenshot-with-qxl-spice.patch
  535feaca-fix-storage-when-directory-name-contains-whitespace.patch
  535ff0b7-fix-install-when-one-package-is-already-installed.patch 
  536152fe-fix-error-detecting-OS-in-show-all-list.patch
  536154d8-show-error-if-launching-delete-dialog-fails.patch
  53615662-call-path_exists-before-getting-storage-volume.patch

- s390x: Set the correct emulator 
  virtinst-set-qemu-emulator.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=169
2014-05-01 03:32:04 +00:00

25 lines
1.1 KiB
Diff

Subject: connection: Call path_exists before getting storage volume (bz 1092739)
From: Cole Robinson crobinso@redhat.com Wed Apr 30 16:00:34 2014 -0400
Date: Wed Apr 30 16:00:34 2014 -0400:
Git: 5c28a00d3e28ba7446f323a31ac47a194eb200b1
path_exists will check to ensure the volume actually survives a pool
refresh, incase it was deleted behind libvirt's back. This makes the
delete dialog happier at least.
Index: virt-manager-1.0.1/virtManager/connection.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/connection.py
+++ virt-manager-1.0.1/virtManager/connection.py
@@ -751,6 +751,10 @@ class vmmConnection(vmmGObject):
return self.get_pool_by_name("default")
def get_vol_by_path(self, path):
+ # path_exists will handle stuff like refreshing a busted pool
+ if not virtinst.VirtualDisk.path_exists(self.get_backend(), path):
+ return None
+
for pool in self.pools.values():
for vol in pool.get_volumes().values():
if vol.get_target_path() == path: