[master/rhel7-branch/f23-branch] Make sure username entered in TUI if create a user chosen. (#1249660)

Vratislav Podzimek vpodzime at redhat.com
Mon Aug 17 05:22:11 UTC 2015


On Fri, 2015-08-14 at 15:40 -0400, Samantha N. Bueno wrote:
> Add an extra check in the TUI user spoke to make sure that a username has
> actually been entered if someone chooses to create a username.
> 
> Resolves: rhbz#1249660
> ---
>  pyanaconda/ui/tui/spokes/user.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py
> index 029b939..0f0a3ef 100644
> --- a/pyanaconda/ui/tui/spokes/user.py
> +++ b/pyanaconda/ui/tui/spokes/user.py
> @@ -143,7 +143,7 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke):
>              self.args.groups.remove("wheel")
>  
>          # Add or remove the user from userlist as needed
> -        if self.args._create and (self.args not in self.data.user.userList):
> +        if self.args._create and (self.args not in self.data.user.userList and self.args.name):
>              self.data.user.userList.append(self.args)
>          elif (not self.args._create) and (self.args in self.data.user.userList):
>              self.data.user.userList.remove(self.args)
ACK.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list