diff options
| author | 2020-01-24 14:26:46 +0000 | |
|---|---|---|
| committer | 2020-01-24 14:27:47 +0000 | |
| commit | 52c3cab627526c2d82de14d0127398c9666d5da4 (patch) | |
| tree | 79723d28987ec07880bd90c18e5c63a51e19952d /src | |
| parent | first draft of command_spec.py (diff) | |
| signature | ||
still append None when an optional spec is missed
Diffstat (limited to 'src')
| -rw-r--r-- | src/core_modules/command_spec.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py index fbf5aa7e..36edf8ef 100644 --- a/src/core_modules/command_spec.py +++ b/src/core_modules/command_spec.py @@ -54,7 +54,7 @@ class Module(ModuleManager.BaseModule): options = self._spec_chunk(server, channel, types, args) - found = False + found = None first_error = None for type, chunk, n, error in options: if error and not first_error: @@ -65,7 +65,9 @@ class Module(ModuleManager.BaseModule): args = args[n:] if len(types) > 1: chunk = [type, chunk] - out.append(chunk) + found = chunk + break + out.append(found) if not optional and not found: error = first_error or "Invalid arguments" |
