diff --git a/src/virtManager/asyncjob.py b/src/virtManager/asyncjob.py index 8db6a88da..8effa664f 100644 --- a/src/virtManager/asyncjob.py +++ b/src/virtManager/asyncjob.py @@ -62,7 +62,7 @@ def _simple_async(callback, args, title, text, parent, errorintro, error = errorintro + ": " + error parent.err.show_err(error, - details=(error + "\n\n" + details)) + details=details) # Displays a progress bar while executing the "callback" method. class vmmAsyncJob(vmmGObjectUI): diff --git a/src/virtManager/clone.py b/src/virtManager/clone.py index 4422ceb0e..dd317e984 100644 --- a/src/virtManager/clone.py +++ b/src/virtManager/clone.py @@ -753,7 +753,7 @@ class vmmCloneVM(vmmGObjectUI): error = (_("Error creating virtual machine clone '%s': %s") % (self.clone_design.clone_name, error)) self.err.show_err(error, - details=(error + "\n" + details)) + details=details) else: self.close() self.conn.tick(noStatsUpdate=True) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index a8349a3d0..630cdb97f 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -1608,7 +1608,7 @@ class vmmCreate(vmmGObjectUI): if error: error = (_("Unable to complete install: '%s'") % error) self.err.show_err(error, - details=(error + "\n" + details)) + details=details) self.failed_guest = self.guest return diff --git a/src/virtManager/createinterface.py b/src/virtManager/createinterface.py index 069c41a20..b1b857e48 100644 --- a/src/virtManager/createinterface.py +++ b/src/virtManager/createinterface.py @@ -1119,7 +1119,7 @@ class vmmCreateInterface(vmmGObjectUI): if error: error = _("Error creating interface: '%s'") % error self.err.show_err(error, - details=(error + "\n" + details)) + details=details) else: # FIXME: Hmm, shouldn't we emit a signal here rather than do this? self.conn.tick(noStatsUpdate=True) diff --git a/src/virtManager/createpool.py b/src/virtManager/createpool.py index 074e88b99..6fd001da7 100644 --- a/src/virtManager/createpool.py +++ b/src/virtManager/createpool.py @@ -402,7 +402,7 @@ class vmmCreatePool(vmmGObjectUI): if error: error = _("Error creating pool: %s") % error self.err.show_err(error, - details=(error + "\n" + details)) + details=details) else: self.close() diff --git a/src/virtManager/createvol.py b/src/virtManager/createvol.py index 9a234fc7d..8a471d03a 100644 --- a/src/virtManager/createvol.py +++ b/src/virtManager/createvol.py @@ -216,7 +216,7 @@ class vmmCreateVolume(vmmGObjectUI): if error: error = _("Error creating vol: %s") % error self.show_err(error, - details=(error + "\n" + details)) + details=details) else: self.emit("vol-created") self.close() diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py index 6b7f6bd43..707dd3d5c 100644 --- a/src/virtManager/engine.py +++ b/src/virtManager/engine.py @@ -822,7 +822,7 @@ class vmmEngine(vmmGObject): if error is not None: error = _("Error saving domain: %s") % error src.err.show_err(error, - details=(error + "\n" + details)) + details=details) def _save_cancel(self, asyncjob, vm): logging.debug("Cancelling save job") @@ -871,7 +871,7 @@ class vmmEngine(vmmGObject): if error is not None: error = _("Error restoring domain: %s") % error src.err.show_err(error, - details=(error + "\n" + details)) + details=details) def _restore_saved_callback(self, asyncjob, file_to_load, conn): ignore = asyncjob diff --git a/src/virtManager/error.py b/src/virtManager/error.py index f34fd7219..db133dcc8 100644 --- a/src/virtManager/error.py +++ b/src/virtManager/error.py @@ -67,7 +67,12 @@ class vmmErrorDialog (object): logging.debug("dialog message: %s : %s" % (summary, details)) if details is None: - details = "".join(traceback.format_exc()) + details = summary + "\n\n" + "".join(traceback.format_exc()) + + # Make sure we have consistent details for error dialogs + if (dialog_type == gtk.MESSAGE_ERROR and not + details.count(summary)): + details = summary + "\n\n" + details dialog = _errorDialog(parent=self.get_parent(), type=dialog_type, buttons=buttons) diff --git a/src/virtManager/migrate.py b/src/virtManager/migrate.py index 1b5ed61eb..afee49524 100644 --- a/src/virtManager/migrate.py +++ b/src/virtManager/migrate.py @@ -462,7 +462,7 @@ class vmmMigrateDialog(vmmGObjectUI): if error: error = _("Unable to migrate guest: %s") % error self.err.show_err(error, - details=(error + "\n" + details)) + details=details) else: self.conn.tick(noStatsUpdate=True) destconn.tick(noStatsUpdate=True) diff --git a/src/virtManager/storagebrowse.py b/src/virtManager/storagebrowse.py index 81de9dab1..aa801276e 100644 --- a/src/virtManager/storagebrowse.py +++ b/src/virtManager/storagebrowse.py @@ -310,6 +310,8 @@ class vmmStorageBrowser(vmmGObjectUI): vol.get_format() or "", namestr]) def show_err(self, info, details=None): - self.err.show_err(info, details, async=False) + self.err.show_err(info, + details=details, + async=False) vmmGObjectUI.type_register(vmmStorageBrowser)