[PATCH] Only the Summary TUI hub wants to accept 'b' to continue (#1077546)

Vratislav Podzimek vpodzime at redhat.com
Tue Mar 18 15:03:41 UTC 2014


On Tue, 2014-03-18 at 09:24 -0400, Samantha N. Bueno wrote:
> On Tue, Mar 18, 2014 at 11:28:32AM +0100, Vratislav Podzimek wrote:
> > Instead of making all TUI hubs continuing when 'b' is entered instead of 'c'
> > move the code to the Summary hub that is the only one really wanting such
> > behaviour.
> > 
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> >  pyanaconda/ui/tui/hubs/__init__.py | 11 ++---------
> >  pyanaconda/ui/tui/hubs/summary.py  | 28 ++++++++++++++++++++++++++++
> >  2 files changed, 30 insertions(+), 9 deletions(-)
> > 
> > diff --git a/pyanaconda/ui/tui/hubs/__init__.py b/pyanaconda/ui/tui/hubs/__init__.py
> > index 905de25..b637f94 100644
> > --- a/pyanaconda/ui/tui/hubs/__init__.py
> > +++ b/pyanaconda/ui/tui/hubs/__init__.py
> > @@ -105,18 +105,11 @@ class TUIHub(TUIObject, common.Hub):
> >          except (ValueError, KeyError):
> >              # If we get a continue, check for unfinished spokes.  If unfinished
> >              # don't continue
> > -            # TRANSLATORS: 'b' to begin installation
> > -            if key == _('b'):
> > +            # TRANSLATORS: 'c' to continue
> > +            if key == _('c'):
> >                  for spoke in self._spokes.values():
> >                      if not spoke.completed and spoke.mandatory:
> >                          print(_("Please complete all spokes before continuing"))
> >                          return False
> 
> Since only the summary hub controls whether you proceed with
> installation, I think the check for whether each mandatory spoke is
> completed is no longer necessary here. We can just return key.
Addons may add more hubs, and the same rules apply to the Initial Setup,
were some mandatory spokes need to be completed before user is allowed
to proceed (e.g. user creation may be forced).

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list