Merge pull request #3953 from melodous/issue-3908

Fix issue 3908. There was some ilegal operations over the sets
This commit is contained in:
Michael DeHaan 2013-08-28 14:01:38 -07:00
commit 30f4d91c6a

View file

@ -1273,16 +1273,20 @@ class AIX(User):
if self.groups is not None:
current_groups = self.user_group_membership()
groups_need_mod = False
groups = []
if self.groups == '':
if current_groups and not self.append:
groups_need_mod = True
else:
groups = self.get_groups_set()
group_diff = set(current_groups).symmetric_difference(groups)
groups_need_mod = False
if group_diff:
if self.append:
for g in groups:
if g in group_diff:
groups.extend(current_groups)
set(groups)
groups_need_mod = True
break
else: