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: else:
value = None value = None
if not argument_type == None and spec_argument.consume: if spec_argument.consume:
out[i] = value out[i] = value
argument_type_name = argument_type.name() if argument_type:
if argument_type_name: key = argument_type.name() or argument_type.type
out[argument_type_name] = value out[key] = value
if not failed: if not failed:
kwargs["spec"] = out kwargs["spec"] = out