args does not always exist (#37019)

When using the reactor on a minion, if you call something like

```
highstate_run:
  caller.state.apply:
      - tgt: blog.gtmanfred.com
```

Then the args in kwargs doesn't exist, so set a default to a list
This commit is contained in:
Daniel Wallace 2016-10-14 17:26:54 -05:00 committed by Nicole Thomas
parent c6254d59fd
commit 4e9824a65e

View file

@ -247,7 +247,7 @@ class ReactWrap(object):
Wrap Caller to enable executing :ref:`caller modules <all-salt.caller>`
'''
log.debug("in caller with fun {0} args {1} kwargs {2}".format(fun, args, kwargs))
args = kwargs['args']
args = kwargs.get('args', [])
if 'caller' not in self.client_cache:
self.client_cache['caller'] = salt.client.Caller(self.opts['conf_file'])
try: