[PATCH 3/3] Password spoke is mandatory if the created user os not an admin
Vratislav Podzimek
vpodzime at redhat.com
Tue Feb 12 11:46:29 UTC 2013
On Mon, 2013-02-11 at 14:24 +0100, Martin Sivak wrote:
> ---
> pyanaconda/ui/gui/spokes/password.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
> index 441050e..ed861da 100644
> --- a/pyanaconda/ui/gui/spokes/password.py
> +++ b/pyanaconda/ui/gui/spokes/password.py
> @@ -85,7 +85,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
>
> @property
> def mandatory(self):
> - return not self.data.user.userList
> + return not [user for user in self.data.user.userList if "wheel" in user.groups]
I believe
return not any(user for user in self.data.user.userList
if "wheel" in user.groups)
would be better readable and is short-circuit.
Also there is a typo in the commit message.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list