diff options
| author | 2020-01-29 17:55:13 +0000 | |
|---|---|---|
| committer | 2020-01-29 17:55:13 +0000 | |
| commit | 338e1864d7b14bc1325d6329ee5401c9943e1c16 (patch) | |
| tree | 6bd93a47dbd1b55cf792e186fa501a17a1b0b570 /src/core_modules | |
| parent | update wikipedia.py to use command specs (diff) | |
| signature | ||
non-present optional args should still be in the spec as None
Diffstat (limited to 'src/core_modules')
| -rw-r--r-- | src/core_modules/command_spec.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py index ffcf77ed..90ada7ec 100644 --- a/src/core_modules/command_spec.py +++ b/src/core_modules/command_spec.py @@ -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 |
