non-present optional args should still be in the spec as None

This commit is contained in:
jesopo 2020-01-29 17:55:13 +00:00
parent 58e68bb75a
commit 338e1864d7

View file

@ -166,11 +166,11 @@ class Module(ModuleManager.BaseModule):
else:
value = None
if not argument_type == None and spec_argument.consume:
if spec_argument.consume:
out[i] = value
argument_type_name = argument_type.name()
if argument_type_name:
out[argument_type_name] = value
if argument_type:
key = argument_type.name() or argument_type.type
out[key] = value
if not failed:
kwargs["spec"] = out