From 902bb03552f592b4eee6de0b2f608b5ab0993098 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 2 Sep 2014 10:58:42 -0700 Subject: [PATCH] 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) --- salt/modules/useradd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/useradd.py b/salt/modules/useradd.py index 22b6674010..905781e812 100644 --- a/salt/modules/useradd.py +++ b/salt/modules/useradd.py @@ -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: