From a495532a4de117a6ffa15098b58b0c67fa9e3e3c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 18 May 2022 22:29:44 +0200 Subject: [PATCH] Removed console debug outputs --- src/cpl_core/configuration/configuration.py | 9 --------- .../general/src/general/arguments/generate_argument.py | 2 -- 2 files changed, 11 deletions(-) diff --git a/src/cpl_core/configuration/configuration.py b/src/cpl_core/configuration/configuration.py index 1fa0fb1f..0f7bfc75 100644 --- a/src/cpl_core/configuration/configuration.py +++ b/src/cpl_core/configuration/configuration.py @@ -159,9 +159,7 @@ class Configuration(ConfigurationABC): def _parse_arguments(self, call_stack: list[Callable], arg_list: list[str], args_types: list[ArgumentABC]): for i in range(0, len(arg_list)): arg_str = arg_list[i] - Console.write_line('ARG_STR', arg_str) for arg in args_types: - Console.write_line('ARG', arg.name, type(arg), len(arg.console_arguments)) arg_str_without_token = arg_str if arg.token != "" and arg.token in arg_str: arg_str_without_token = arg_str.split(arg.token)[1] @@ -170,7 +168,6 @@ class Configuration(ConfigurationABC): if isinstance(arg, ExecutableArgument): if arg_str.startswith(arg.token) \ and arg_str_without_token == arg.name or arg_str_without_token in arg.aliases: - Console.write_line('EXEC', arg.name) call_stack.append(arg.run) self._parse_arguments(call_stack, arg_list[i:], arg.console_arguments) @@ -195,22 +192,16 @@ class Configuration(ConfigurationABC): self._additional_arguments.append(arg.name) self._parse_arguments(call_stack, arg_list[i + 1:], arg.console_arguments) - Console.write_line() - def parse_console_arguments(self, error: bool = None): # sets environment variables as possible arguments as: --VAR=VALUE for arg_name in ConfigurationVariableNameEnum.to_list(): self.add_console_argument(VariableArgument('--', str(arg_name).upper(), [str(arg_name).lower()], '=')) - Console.error('Parsing arguments:') arg_list = sys.argv[1:] call_stack = [] self._parse_arguments(call_stack, arg_list, self._argument_types) - Console.error('Parsing finished') - for call in call_stack: - Console.write_line(call) call(self._additional_arguments) def add_json_file(self, name: str, optional: bool = None, output: bool = True, path: str = None): diff --git a/src/tests/custom/general/src/general/arguments/generate_argument.py b/src/tests/custom/general/src/general/arguments/generate_argument.py index b6830b32..58a35467 100644 --- a/src/tests/custom/general/src/general/arguments/generate_argument.py +++ b/src/tests/custom/general/src/general/arguments/generate_argument.py @@ -13,6 +13,4 @@ class GenerateArgument(ArgumentExecutableABC): def run(self, args: list[str]): Console.error('Generate:') - for c in self._config._config: - Console.write_line(c, self._config.get_configuration(c)) Console.write_line(args, self._env.environment_name)