[PATCH 2/2] Ignore the data model and just return self.environment
Martin Kolman
mkolman at redhat.com
Tue Mar 11 08:45:06 UTC 2014
On Tue, 2014-03-11 at 08:33 +0100, Vratislav Podzimek wrote:
> On Mon, 2014-03-10 at 20:27 +0100, Martin Kolman wrote:
> > Signed-off-by: Martin Kolman <mkolman at redhat.com>
> > ---
> > pyanaconda/ui/gui/spokes/software.py | 14 +++++---------
> > 1 file changed, 5 insertions(+), 9 deletions(-)
> >
> > diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
> > index cf976a8..2864aa5 100644
> > --- a/pyanaconda/ui/gui/spokes/software.py
> > +++ b/pyanaconda/ui/gui/spokes/software.py
> > @@ -386,16 +386,12 @@ class SoftwareSelectionSpoke(NormalSpoke):
> >
> > return retval
> >
> > - # Returns the row in the store corresponding to what's selected on the
> > - # left hand panel, or None if nothing's selected.
> > def _get_selected_environment(self):
> > - for (ndx, row) in enumerate(self._environmentListBox.get_children()):
> > - box = row.get_children()[0]
> > - button = box.get_children()[0]
> > - if button.get_active():
> > - return self.payload.environments[ndx]
> > -
> > - return None
> > + # Returnes the currently selected environment
> ^Returns
> > + # (self.environment is set in both initilize() and apply(),
> > + # so we don't need to care about the state of the
> > + # internal data model at all)
> > + return self.environment
> Also, could you please make the comment a bit wider so that it doesn't
> take so many lines? Otherwise these both look good to me.
>
OK, thanks, fixing locally! :)
More information about the anaconda-patches
mailing list