Merge pull request #15440 from hulu/useradd

modules.useradd.get_loginclass: avoid shadowing outer info() func
This commit is contained in:
Thomas S Hatch 2014-09-02 17:32:42 -06:00
commit 32c99ce1d6

View File

@ -531,9 +531,9 @@ def get_loginclass(name):
''' '''
if __grains__['kernel'] != 'OpenBSD': if __grains__['kernel'] != 'OpenBSD':
return False return False
info = __salt__['cmd.run_stdout']('userinfo {0}'.format(name), userinfo = __salt__['cmd.run_stdout']('userinfo {0}'.format(name),
output_loglevel='debug') output_loglevel='debug')
for line in info.splitlines(): for line in userinfo.splitlines():
if line.startswith("class"): if line.startswith("class"):
loginclass = line.split() loginclass = line.split()
if len(loginclass) == 2: if len(loginclass) == 2: