pylint fixes

This commit is contained in:
Jeremy Rosenbaum 2015-04-18 22:42:13 -07:00
parent 656a8d1339
commit b74b2dde60

View File

@ -69,13 +69,13 @@ def splay(*args, **kwargs):
func = args.pop(0) func = args.pop(0)
# Check if the func is valid before the sleep # Check if the func is valid before the sleep
if not func in __salt__: if func not in __salt__:
raise CommandExecutionError('Unable to find module function {0}'.format(func)) raise CommandExecutionError('Unable to find module function {0}'.format(func))
my_delay = _calc_splay(__grains__['id'], splaytime=splaytime) my_delay = _calc_splay(__grains__['id'], splaytime=splaytime)
time.sleep(my_delay) time.sleep(my_delay)
# Get rid of the hidden kwargs that salt injects # Get rid of the hidden kwargs that salt injects
func_kwargs = dict((k,v) for k,v in kwargs.iteritems() if not k.startswith('__')) func_kwargs = dict((k, v) for k, v in kwargs.iteritems() if not k.startswith('__'))
result = __salt__[func](*args, **func_kwargs) result = __salt__[func](*args, **func_kwargs)
if type(result) != dict: if type(result) != dict:
result = {'result': result} result = {'result': result}