From 707df3f27d41bc510c187e5941e85e64d9536d1a Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 26 Oct 2021 23:23:56 +0200 Subject: [PATCH] Fixed command handling --- src/cpl_core/configuration/configuration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpl_core/configuration/configuration.py b/src/cpl_core/configuration/configuration.py index aaf7d457..685e2d2d 100644 --- a/src/cpl_core/configuration/configuration.py +++ b/src/cpl_core/configuration/configuration.py @@ -199,7 +199,8 @@ class Configuration(ConfigurationABC): if alias == argument or f' {alias} ' == argument: found = True - if argument_type.name != argument and not found: + if (argument_type.token != '' and f'{argument_type.token}{argument_type.name}' != argument + or argument_type.name not in argument) and not found: return False if (next_arguments is None or len(next_arguments) == 0) and \ @@ -210,7 +211,7 @@ class Configuration(ConfigurationABC): value = '' else: value = next_arguments[0] - next_arguments.remove(value) + # next_arguments.remove(value) self._handled_args.append(value) if argument_type.token != '' and argument.startswith(argument_type.token):