From d5164e4a2e53d46451b846b477efce9ba4ced75a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 31 Jan 2010 13:31:16 +0100 Subject: [PATCH] [sulfur] do not switch back to packages tab when unknown error happens --- sulfur/src/sulfur/__init__.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sulfur/src/sulfur/__init__.py b/sulfur/src/sulfur/__init__.py index 8477f04ac..5356b83da 100644 --- a/sulfur/src/sulfur/__init__.py +++ b/sulfur/src/sulfur/__init__.py @@ -2116,14 +2116,22 @@ class SulfurApplication(Controller, SulfurApplicationEventsMixin): _("Attention. You chose to abort the processing.")) elif err == 1: # install failed okDialog(self.ui.main, - _("Attention. An error occured when processing the queue." - "\nPlease have a look in the processing terminal.") + _("Attention. An error occured while processing the queue." + "\nPlease have a look at the terminal.") ) + state = False elif err in (2, 3): # 2: masked package cannot be unmasked # 3: license not accepted, move back to queue page switch_back_page = 'packages' state = False + elif err != 0: + # wtf? + okDialog(self.ui.main, + _("Attention. Something really bad happened." + "\nPlease have a look at the terminal.") + ) + state = False elif (err == 0) and restart_needed and \ ((not fetch_only) and (not download_sources)): @@ -2178,7 +2186,7 @@ class SulfurApplication(Controller, SulfurApplicationEventsMixin): self.disable_ugc = False if switch_back_page is not None: self.switch_notebook_page(switch_back_page) - else: + elif state: self.switch_notebook_page('packages') self.Equo.resources_remove_lock()