Merge pull request #25924 from skizunov/develop2

Bugfix: Kwargs is not correctly parsed when using multi-function jobs
This commit is contained in:
Mike Place 2015-07-31 14:27:12 -06:00
commit cc80738a83

View File

@ -1747,13 +1747,18 @@ class SaltCMDOptionParser(six.with_metaclass(OptionParserMeta,
if len(self.config['fun']) != len(self.config['arg']):
self.exit(42, 'Cannot execute compound command without '
'defining all arguments.\n')
# parse the args and kwargs before sending to the publish
# interface
for i in range(len(self.config['arg'])):
self.config['arg'][i] = salt.utils.args.parse_input(
self.config['arg'][i])
else:
self.config['fun'] = self.args[1]
self.config['arg'] = self.args[2:]
# parse the args and kwargs before sending to the publish interface
self.config['arg'] = \
salt.utils.args.parse_input(self.config['arg'])
# parse the args and kwargs before sending to the publish
# interface
self.config['arg'] = \
salt.utils.args.parse_input(self.config['arg'])
except IndexError:
self.exit(42, '\nIncomplete options passed.\n\n')