Fix module arg parsing when 'args' are present but not a dict (v2)

This commit is contained in:
James Cammarata 2015-05-02 22:17:02 -05:00
parent 6a44056d76
commit 8cf4452d48
2 changed files with 6 additions and 1 deletions

View file

@ -135,7 +135,11 @@ class ModuleArgsParser:
# this can occasionally happen, simplify
if args and 'args' in args:
args = args['args']
tmp_args = args['args']
del args['args']
if isinstance(tmp_args, string_types):
tmp_args = parse_kv(tmp_args)
args.update(tmp_args)
# finally, update the args we're going to return with the ones
# which were normalized above