From 9b7bf37c55638c9a63e327eecd1bc724b4b62ce5 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 11 Jan 2010 10:30:40 -0500 Subject: [PATCH] console: Try to catch xen race errors when opening VNC --- src/virtManager/console.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/virtManager/console.py b/src/virtManager/console.py index 326671301..a4adf34d8 100644 --- a/src/virtManager/console.py +++ b/src/virtManager/console.py @@ -546,8 +546,16 @@ class vmmConsolePages(gobject.GObject): self.schedule_retry() return + try: + (protocol, host, + port, trans, username) = self.vm.get_graphics_console() + except Exception, e: + # We can fail here if VM is destroyed: xen is a bit racy + # and can't handle domain lookups that soon after + logging.debug("Getting graphics console failed: %s" % str(e)) + return + connport = None - protocol, host, port, trans, username = self.vm.get_graphics_console() if host.count(":"): host, connport = host.split(":", 1)