Commit 07ef8c4d by rishid

Verify groups string is not empty before trying add user to groups

parent 0335d05f
......@@ -279,7 +279,7 @@ class User(object):
cmd.append('-g')
cmd.append(self.group)
if self.groups is not None:
if self.groups is not None and len(self.groups):
groups = self.get_groups_set()
cmd.append('-G')
cmd.append(','.join(groups))
......@@ -1221,7 +1221,7 @@ class AIX(User):
cmd.append('-g')
cmd.append(self.group)
if self.groups is not None:
if self.groups is not None and len(self.groups):
groups = self.get_groups_set()
cmd.append('-G')
cmd.append(','.join(groups))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment