[PATCH 4/4] Update the User spokes and add condition field to declarative list of attributes
Chris Lumens
clumens at redhat.com
Mon Mar 11 14:50:28 UTC 2013
> diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
> index af39856..1154ed2 100644
> --- a/pyanaconda/ui/gui/spokes/user.py
> +++ b/pyanaconda/ui/gui/spokes/user.py
> @@ -33,26 +33,12 @@ from pyanaconda.ui.gui import GUIObject
> from pyanaconda.ui.gui.categories.user_settings import UserSettingsCategory
> from pyanaconda.ui.common import FirstbootSpokeMixIn
> from pyanaconda.ui.gui.utils import enlightbox
> +from pyanaconda.ui.tui.spokes.user import strip_accents, guess_username
Interfaces shouldn't depend on each other like this. There's
pyanaconda/ui/lib where common functions can go.
> diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
> index 6bac732..9e7289a 100644
> --- a/pyanaconda/ui/tui/spokes/__init__.py
> +++ b/pyanaconda/ui/tui/spokes/__init__.py
> @@ -90,7 +90,7 @@ class EditTUIDialog(NormalTUISpoke):
> self.value = None
> return True
>
> - def prompt(self, (title, value, regex)):
> + def prompt(self, (title, value, regex, cond)):
> if regex == self.PASSWORD:
> pw = self._app.raw_input(_("%s: ") % title, hidden=True)
> confirm = self._app.raw_input(_("%s (confirm): ") % title, hidden=True)
If these methods took an object instead of a tuple, you wouldn't have
to change them all.
- Chris
More information about the anaconda-patches
mailing list