From 13d61f97c905217486143ce14ef0e085db26a9ec Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 21 Apr 2010 10:08:04 -0400 Subject: [PATCH] Only close connection on error from 'remote' error domain. --- src/virtManager/engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py index a6998f007..942a0a695 100644 --- a/src/virtManager/engine.py +++ b/src/virtManager/engine.py @@ -428,7 +428,8 @@ class vmmEngine(gobject.GObject): 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.")