Skip to content

Commit

Permalink
openbsdrcctl: turn badvar into a tuple and fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ajacoutot committed Jan 6, 2015
1 parent 113c56a commit 7b99eeb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions salt/modules/openbsdrcctl.py
Expand Up @@ -91,12 +91,12 @@ def get_all():
salt '*' service.get_all
'''
badvar = [ "_timeout", "_user" ]
badvar = ("_timeout", "_user")
ret = []
service = _cmd()
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
svc = re.sub('(_flags|)=.*$', '', svc)
if not svc.endswith(tuple(badvar)):
if not svc.endswith(badvar):
ret.append(svc)
return sorted(ret)

Expand All @@ -111,13 +111,13 @@ def get_disabled():
salt '*' service.get_disabled
'''
badvar = [ "_timeout", "_user" ]
badvar = ("_timeout", "_user")
ret = []
service = _cmd()
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
if svc.endswith("=NO"):
svc = re.sub('(_flags|)=.*$', '', svc)
if not svc.endswith(tuple(badvar)):
if not svc.endswith(badvar):
ret.append(svc)
return sorted(ret)

Expand All @@ -132,13 +132,13 @@ def get_enabled():
salt '*' service.get_enabled
'''
badvar = [ "_timeout", "_user" ]
badvar = ("_timeout", "_user")
ret = []
service = _cmd()
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
if not svc.endswith("=NO"):
svc = re.sub('(_flags|)=.*$', '', svc)
if not svc.endswith(tuple(badvar)):
if not svc.endswith(badvar):
ret.append(svc)
return sorted(ret)

Expand Down

0 comments on commit 7b99eeb

Please sign in to comment.