aboutsummaryrefslogtreecommitdiff
path: root/src/core_modules
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-29 17:55:13 +0000
committerGravatar jesopo2020-01-29 17:55:13 +0000
commit338e1864d7b14bc1325d6329ee5401c9943e1c16 (patch)
tree6bd93a47dbd1b55cf792e186fa501a17a1b0b570 /src/core_modules
parentupdate 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.py8
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