Skip to content

Commit

Permalink
Fix case where args or kwargs are not specified
Browse files Browse the repository at this point in the history
Currently, the m_ret line will error if the loop state definition does not specify values for args or kwargs, because None is neither iterable nor a map. If not specified, those values should be set to an empty list and empty dict.
  • Loading branch information
mtlaird authored Aug 9, 2018
1 parent 03303a3 commit f0c0bd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion salt/states/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ def until(name,
ret['comment'] = 'The execution module {0} will be run'.format(name)
ret['result'] = None
return ret

if not m_args:
m_args = []
if not m_kwargs:
m_kwargs = {}

def timed_out():
if time.time() >= timeout:
return True
Expand Down

0 comments on commit f0c0bd0

Please sign in to comment.