virt-manager/virt-manager-0.8.4-close-remote-error.patch

21 lines
1001 B
Diff
Raw Normal View History

# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1271858884 14400
# Node ID 33ec21628630a9b468150b1eba635b1a83fc8a36
# Parent 41182500ddeff72cb9b875f3884042b922ed8c15
Only close connection on error from 'remote' error domain.
diff -r 41182500ddef -r 33ec21628630 src/virtManager/engine.py
--- a/src/virtManager/engine.py Sun Apr 18 00:15:36 2010 -0500
+++ b/src/virtManager/engine.py Wed Apr 21 10:08:04 2010 -0400
@@ -428,7 +428,8 @@
except KeyboardInterrupt:
raise
except libvirt.libvirtError, e:
- if e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR:
+ if (e.get_error_domain() == libvirt.VIR_FROM_REMOTE and
+ e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR):
logging.exception("Could not refresh connection %s." % uri)
logging.debug("Closing connection since libvirtd "
"appears to have stopped.")