Fix createUser and createGroup to work with kickstart defaults (#739428)
From: "Brian C. Lane" <bcl@redhat.com>
When the kickstart data is passed to crateUser and createGroup it
already has defaults for the attributes. Instead of only checking for
their presence in kwargs also check for non-default values.
---
pyanaconda/users.py | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
- def createGroup (self, name, **kwargs):
+ def createGroup (self, group_name, **kwargs):
"""Create a new user on the system with the given name. Optional kwargs:
gid -- The GID for the new user. If none is given, the next
@@ -120,10 +120,10 @@ class Users:
self.admin = libuser.admin()
try:
- if self.admin.lookupGroupByName(name):
+ if self.admin.lookupGroupByName(group_name):
os._exit(1)