Resolves: rhbz#730959 --- dispatch.py | 2 ++ storage/__init__.py | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dispatch.py b/dispatch.py index d098698..1be5989 100644 --- a/dispatch.py +++ b/dispatch.py @@ -128,6 +128,8 @@ class Dispatcher(object): def canGoBack(self): # begin with the step before this one. If all steps are skipped, # we can not go backwards from this screen + if self.step is None: + return False i = self.step - 1 while i >= self.firstStep: if not self.stepIsDirect(i) and not self.skipSteps.has_key(installSteps[i][0]): diff --git a/storage/__init__.py b/storage/__init__.py index 414ca8b..3ad9286 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -103,13 +103,18 @@ def storageInitialize(anaconda): storage.reset() if not storage.disks: + custom_buttons=[_("_Try again"), _("_Exit installer")] + if anaconda.dispatch.canGoBack(): + custom_buttons = [_("_Back"), _("_Exit installer")] rc = anaconda.intf.messageWindow(_("No disks found"), - _("No usable disks have been found."), - type="custom", - custom_buttons = [_("Back"), _("_Exit installer")], - default=0) + _("No usable disks have been found."), + type="custom", + custom_buttons=custom_buttons, default=0) if rc == 0: - return DISPATCH_BACK + if anaconda.dispatch.canGoBack(): + return DISPATCH_BACK + else: + return storageInitialize(anaconda) sys.exit(1) # dispatch.py helper function -- 1.7.4.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list