Don't show error if user cancelled polkit auth

Requires recent libvirt patch to help us differentiate the error.
This commit is contained in:
Cole Robinson 2012-01-27 16:00:04 -05:00
parent 2e297ab70c
commit 8a92690a55

View File

@ -1167,6 +1167,12 @@ class vmmConnection(vmmGObject):
self.state = self.STATE_DISCONNECTED
if (libexc and
(libexc.get_error_code() ==
getattr(libvirt, "VIR_ERR_AUTH_CANCELLED", None))):
logging.debug("User cancelled auth, not raising any error.")
break
if (libexc and
libexc.get_error_code() == libvirt.VIR_ERR_AUTH_FAILED and
"GSSAPI Error" in libexc.get_error_message() and
@ -1201,6 +1207,7 @@ class vmmConnection(vmmGObject):
self.vms.keys())
if self.state == self.STATE_DISCONNECTED:
if self.connectError:
self.idle_emit("connect-error", self.connectError)
self.connectError = None