From 52c3cab627526c2d82de14d0127398c9666d5da4 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 24 Jan 2020 14:26:46 +0000 Subject: still append None when an optional spec is missed --- src/core_modules/command_spec.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core_modules') 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" -- cgit v1.3.1-10-gc9f91