Search
j0ke.net Open Build Service
>
Projects
>
virtualization
>
virt-manager
> virtman-misc.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File virtman-misc.diff of Package virt-manager
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/console.py virt-manager-0.5.3/src/virtManager/console.py --- virt-manager-0.5.3.orig/src/virtManager/console.py 2008-04-25 16:13:35.000000000 -0600 +++ virt-manager-0.5.3/src/virtManager/console.py 2008-04-25 16:14:54.000000000 -0600 @@ -91,6 +91,7 @@ self.vncViewer.show() self.vncViewerRetriesScheduled = 0 + self.vncViewerMaxRetries = 10 self.vncViewerRetryDelay = 125 self.vncViewer.connect("size-request", self._force_resize) self.connected = 0 @@ -204,7 +205,7 @@ def send_key(self, src): keys = None if src.get_name() == "menu-send-cad": - keys = ["Control_L", "Alt_L", "Del"] + keys = ["Control_L", "Alt_L", "Delete"] elif src.get_name() == "menu-send-cab": keys = ["Control_L", "Alt_L", "BackSpace"] elif src.get_name() == "menu-send-caf1": @@ -224,7 +225,7 @@ elif src.get_name() == "menu-send-caf8": keys = ["Control_L", "Alt_L", "F8"] elif src.get_name() == "menu-send-printscreen": - keys = ["PrintScreen"] + keys = ["Print"] if keys != None: self.vncViewer.send_keys(keys) @@ -374,7 +375,7 @@ def schedule_retry(self): self.vncViewerRetriesScheduled = self.vncViewerRetriesScheduled + 1 - if self.vncViewerRetriesScheduled >= 10: + if self.vncViewerRetriesScheduled >= self.vncViewerMaxRetries: logging.error("Too many connection failures, not retrying again") return logging.warn("Retrying connection in %d ms", self.vncViewerRetryDelay) @@ -387,9 +388,15 @@ return gtk.gdk.threads_enter() try: - logging.debug("Got timed retry") - self.try_login() - return + try: + logging.debug("Got timed retry") + self.try_login() + return + except libvirt.libvirtError, e: + # libvirtError is expected when vm is inactive during a reboot + # only show exception if it is going to cause a viewer failure + if self.vncViewerRetriesScheduled >= self.vncViewerMaxRetries - 1: + logging.error("Login error: %s" % str(e)) finally: gtk.gdk.threads_leave() @@ -484,7 +491,7 @@ self.vncViewer.set_credential(credList[i], "libvirt-vnc") else: # Force it to stop re-trying - self.vncViewerRetriesScheduled = 10 + self.vncViewerRetriesScheduled = self.vncViewerMaxRetries self.vncViewer.close() self.activate_unavailable_page(_("Unsupported console authentication type")) diff -Nuar virt-manager-0.5.3.orig/src/virtManager/details.py virt-manager-0.5.3/src/virtManager/details.py --- virt-manager-0.5.3.orig/src/virtManager/details.py 2008-01-10 18:17:51.000000000 -0700 +++ virt-manager-0.5.3/src/virtManager/details.py 2008-04-25 16:14:26.000000000 -0600 @@ -553,7 +553,7 @@ else: vnic = virtinst.VirtualNetworkInterface(type=netinfo[0], macaddr=netinfo[3]) except ValueError, e: - self.err_dialog(_("Error Removing Network: %s" % str(e)), + self._err_dialog(_("Error Removing Network: %s" % str(e)), "".join(traceback.format_exc())) return