593e13f1ce
virtinst-git-mac-prefix.diff virtman-git-error-reporting.diff virtman-git-explicit-python.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=75
70 lines
2.7 KiB
Diff
70 lines
2.7 KiB
Diff
|
|
Subject: details: Better logging and error reporting for child dialogs
|
|
From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:29:51 2011 -0400
|
|
Date: Tue Aug 30 14:29:51 2011 -0400:
|
|
Git: cbbc8044bf3eaed18f09c0c2af40e9a4aa6e7717
|
|
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/details.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/details.py
|
|
+++ virt-manager-0.9.0/src/virtManager/details.py
|
|
@@ -1392,6 +1392,7 @@ class vmmDetails(vmmGObjectUI):
|
|
if self.addhw is None:
|
|
self.addhw = vmmAddHardware(self.vm)
|
|
|
|
+ logging.debug("Launching addhw for vm '%s'", self.vm.get_name())
|
|
self.addhw.show(self.topwin)
|
|
except Exception, e:
|
|
self.err.show_err((_("Error launching hardware dialog: %s") %
|
|
@@ -1771,24 +1772,34 @@ class vmmDetails(vmmGObjectUI):
|
|
curpath = disk.path
|
|
devtype = disk.device
|
|
|
|
- if curpath:
|
|
- # Disconnect cdrom
|
|
- self.change_storage_media(dev_id_info, None)
|
|
+ try:
|
|
+ if curpath:
|
|
+ # Disconnect cdrom
|
|
+ self.change_storage_media(dev_id_info, None)
|
|
+ return
|
|
+ except Exception, e:
|
|
+ self.err.show_err((_("Error disconnecting media: %s") % e))
|
|
return
|
|
|
|
- def change_cdrom_wrapper(src_ignore, dev_id_info, newpath):
|
|
- return self.change_storage_media(dev_id_info, newpath)
|
|
+ try:
|
|
+ def change_cdrom_wrapper(src_ignore, dev_id_info, newpath):
|
|
+ return self.change_storage_media(dev_id_info, newpath)
|
|
+
|
|
+ # Launch 'Choose CD' dialog
|
|
+ if self.media_choosers[devtype] is None:
|
|
+ ret = vmmChooseCD(self.vm, dev_id_info)
|
|
|
|
- # Launch 'Choose CD' dialog
|
|
- if self.media_choosers[devtype] is None:
|
|
- ret = vmmChooseCD(self.vm, dev_id_info)
|
|
-
|
|
- ret.connect("cdrom-chosen", change_cdrom_wrapper)
|
|
- self.media_choosers[devtype] = ret
|
|
-
|
|
- dialog = self.media_choosers[devtype]
|
|
- dialog.dev_id_info = dev_id_info
|
|
- dialog.show(self.topwin)
|
|
+ ret.connect("cdrom-chosen", change_cdrom_wrapper)
|
|
+ self.media_choosers[devtype] = ret
|
|
+
|
|
+ dialog = self.media_choosers[devtype]
|
|
+ dialog.dev_id_info = dev_id_info
|
|
+
|
|
+ logging.debug("Launching choosecd for vm '%s'", self.vm.get_name())
|
|
+ dialog.show(self.topwin)
|
|
+ except Exception, e:
|
|
+ self.err.show_err((_("Error launching media dialog: %s") % e))
|
|
+ return
|
|
|
|
##################################################
|
|
# Details/Hardware config changes (apply button) #
|