Fixes #2322 fix for missing append check on Darwin systems (#4256)

This commit is contained in:
Levi Morales 2016-08-30 04:59:04 -05:00 committed by Michael Scherer
parent 5728ef89f0
commit 688fa6fc54

View file

@ -1549,12 +1549,13 @@ class DarwinUser(User):
else:
target = set([])
for remove in current - target:
(_rc, _err, _out) = self.__modify_group(remove, 'delete')
rc += rc
out += _out
err += _err
changed = True
if self.append is False:
for remove in current - target:
(_rc, _err, _out) = self.__modify_group(remove, 'delete')
rc += rc
out += _out
err += _err
changed = True
for add in target - current:
(_rc, _err, _out) = self.__modify_group(add, 'add')