mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
modules.useradd.get_loginclass: avoid shadowing outer info() func
************* Module salt.modules.useradd salt/modules/useradd.py:534: [W0621(redefined-outer-name), get_loginclass] Redefining name 'info' from outer scope (line 504)
This commit is contained in:
parent
294ea72d94
commit
902bb03552
@ -531,9 +531,9 @@ def get_loginclass(name):
|
||||
'''
|
||||
if __grains__['kernel'] != 'OpenBSD':
|
||||
return False
|
||||
info = __salt__['cmd.run_stdout']('userinfo {0}'.format(name),
|
||||
userinfo = __salt__['cmd.run_stdout']('userinfo {0}'.format(name),
|
||||
output_loglevel='debug')
|
||||
for line in info.splitlines():
|
||||
for line in userinfo.splitlines():
|
||||
if line.startswith("class"):
|
||||
loginclass = line.split()
|
||||
if len(loginclass) == 2:
|
||||
|
Loading…
Reference in New Issue
Block a user