[PATCH v02] Clean up code for input handling in TUI spokes.
Brian C. Lane
bcl at redhat.com
Wed Sep 4 21:41:33 UTC 2013
On Wed, Sep 04, 2013 at 12:41:29PM -0400, Samantha N. Bueno wrote:
> + except ValueError:
> + if key.lower() == "c" and 0 <= self._selection < len(self.payload.environments):
> + self.apply()
> + self.close()
> + return True
> + else:
> + return key
Should probably add a docstring with info about the possible return
values. True, key, None? T/F, key?
> +
> + if 0 <= keyid < len(self.payload.environments):
> + self._selection = keyid
> + return None
Should this return False instead of None?
> + else:
> + if num == 1:
> + # iso selected, just set some vars and return to main hub
> + self.data.method.method = "cdrom"
> + self.payload.install_device = self._cdrom
> + self.apply()
> + self.close()
> + return True
> + else:
> + self.app.switch_screen(self, num)
> + return None
Same question here, and in the rest of the patch.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130904/fb17a35e/attachment.sig>
More information about the anaconda-patches
mailing list