From 9c61ae1f9dd713af59c6bd54aeb07ae3cd392142 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 13 Feb 2025 18:34:54 +0800 Subject: [PATCH] fix: move command param to kwargs --- src/cli/nomos_cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cli/nomos_cli.py b/src/cli/nomos_cli.py index d4adb9b..f13255c 100644 --- a/src/cli/nomos_cli.py +++ b/src/cli/nomos_cli.py @@ -16,7 +16,14 @@ logger = get_custom_logger(__name__) class NomosCli: - def __init__(self, command=""): + def __init__(self, **kwargs): + if "command" not in kwargs: + raise ValueError("The command parameter is required") + + command = kwargs["command"] + if command not in nomos_cli: + raise ValueError("Unknown command provided") + logger.debug(f"Cli is going to be initialized with this config {nomos_cli[command]}") self._command = command self._image_name = nomos_cli[command]["image"]