mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
PEP8 E712 fixes (#21916)
This commit is contained in:
@@ -105,7 +105,7 @@ class Group(object):
|
||||
if key == 'gid' and kwargs[key] is not None:
|
||||
cmd.append('-g')
|
||||
cmd.append(kwargs[key])
|
||||
elif key == 'system' and kwargs[key] == True:
|
||||
elif key == 'system' and kwargs[key] is True:
|
||||
cmd.append('-r')
|
||||
cmd.append(self.name)
|
||||
return self.execute_command(cmd)
|
||||
@@ -190,8 +190,8 @@ class AIX(Group):
|
||||
cmd = [self.module.get_bin_path('mkgroup', True)]
|
||||
for key in kwargs:
|
||||
if key == 'gid' and kwargs[key] is not None:
|
||||
cmd.append('id='+kwargs[key])
|
||||
elif key == 'system' and kwargs[key] == True:
|
||||
cmd.append('id=' + kwargs[key])
|
||||
elif key == 'system' and kwargs[key] is True:
|
||||
cmd.append('-a')
|
||||
cmd.append(self.name)
|
||||
return self.execute_command(cmd)
|
||||
@@ -202,7 +202,7 @@ class AIX(Group):
|
||||
for key in kwargs:
|
||||
if key == 'gid':
|
||||
if kwargs[key] is not None and info[2] != int(kwargs[key]):
|
||||
cmd.append('id='+kwargs[key])
|
||||
cmd.append('id=' + kwargs[key])
|
||||
if len(cmd) == 1:
|
||||
return (None, '', '')
|
||||
if self.module.check_mode:
|
||||
@@ -275,9 +275,9 @@ class DarwinGroup(Group):
|
||||
cmd += [ '-o', 'create' ]
|
||||
if self.gid is not None:
|
||||
cmd += [ '-i', self.gid ]
|
||||
elif 'system' in kwargs and kwargs['system'] == True:
|
||||
elif 'system' in kwargs and kwargs['system'] is True:
|
||||
gid = self.get_lowest_available_system_gid()
|
||||
if gid != False:
|
||||
if gid is not False:
|
||||
self.gid = str(gid)
|
||||
cmd += [ '-i', self.gid ]
|
||||
cmd += [ '-L', self.name ]
|
||||
|
||||
Reference in New Issue
Block a user