From 02ad309daaedc409d8ecd5e493a19b06529e5f10 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 6 Mar 2014 12:04:08 -0500 Subject: [PATCH] Handle libvirt generating invalid volume XML (bz 1072770) (cherry picked from commit df7012a68b6a13a676e2019523f6863617a110d8) --- virtManager/connection.py | 2 +- virtinst/connection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virtManager/connection.py b/virtManager/connection.py index 96dfa1c..57e143d 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -179,7 +179,7 @@ class vmmConnection(vmmGObject): for vol in pool.get_volumes(refresh=False).values(): try: ret.append(vol.get_xmlobj(refresh_if_nec=False)) - except libvirt.libvirtError, e: + except Exception, e: logging.debug("Fetching volume XML failed: %s", e) return ret self._backend.cb_fetch_all_vols = fetch_all_vols diff --git a/virtinst/connection.py b/virtinst/connection.py index a915f25..3cc5b79 100644 --- a/virtinst/connection.py +++ b/virtinst/connection.py @@ -222,7 +222,7 @@ class VirtualConnection(object): try: xml = vol.XMLDesc(0) ret.append(StorageVolume(weakref.ref(self), parsexml=xml)) - except libvirt.libvirtError, e: + except Exception, e: logging.debug("Fetching volume XML failed: %s", e) if self.cache_object_fetch: