mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #25924 from skizunov/develop2
Bugfix: Kwargs is not correctly parsed when using multi-function jobs
This commit is contained in:
commit
cc80738a83
@ -1747,13 +1747,18 @@ class SaltCMDOptionParser(six.with_metaclass(OptionParserMeta,
|
|||||||
if len(self.config['fun']) != len(self.config['arg']):
|
if len(self.config['fun']) != len(self.config['arg']):
|
||||||
self.exit(42, 'Cannot execute compound command without '
|
self.exit(42, 'Cannot execute compound command without '
|
||||||
'defining all arguments.\n')
|
'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:
|
else:
|
||||||
self.config['fun'] = self.args[1]
|
self.config['fun'] = self.args[1]
|
||||||
self.config['arg'] = self.args[2:]
|
self.config['arg'] = self.args[2:]
|
||||||
|
# parse the args and kwargs before sending to the publish
|
||||||
# parse the args and kwargs before sending to the publish interface
|
# interface
|
||||||
self.config['arg'] = \
|
self.config['arg'] = \
|
||||||
salt.utils.args.parse_input(self.config['arg'])
|
salt.utils.args.parse_input(self.config['arg'])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.exit(42, '\nIncomplete options passed.\n\n')
|
self.exit(42, '\nIncomplete options passed.\n\n')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user