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:
Chris Rebert 2014-09-02 10:58:42 -07:00
parent 294ea72d94
commit 902bb03552

View File

@ -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: