From 5be1cca2e3796c2265aa5d2cb0e834b5cff1668a Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Tue, 17 Sep 2024 15:45:31 -0400 Subject: [PATCH] test --- cray/modules/bos/cli.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/cray/modules/bos/cli.py b/cray/modules/bos/cli.py index a5e46fb..9db95f1 100644 --- a/cray/modules/bos/cli.py +++ b/cray/modules/bos/cli.py @@ -235,15 +235,7 @@ def _decorator(clear_pending_state, **kwargs): def modify_component_patch(): """ Modifies update command for components """ source_command = cli.commands['v2'].commands['components'].commands['update'] - command_type = type(source_command) - new_command = command_type("update") - for key, value in source_command.__dict__.items(): - setattr(new_command, key, value) - cli.commands['v2'].commands['components'].commands['update'] = new_command - new_command.params = [] - default_params = [param for param in source_command.params if - not param.expose_value] - option( + source_command.params.append(option( '--clear-pending-state', is_flag=True, help='Shortcut for --staged-state-session "" --staged-state-configuration "" ' @@ -253,9 +245,8 @@ def modify_component_patch(): '--desired-state-configuration "" --desired-state-boot-artifacts-initrd "" ' '--desired-state-boot-artifacts-kernel-parameters "" ' '--desired-state-boot-artifacts-kernel ""' - )(new_command) - new_command.params += default_params - new_command.callback = create_patch_compnent_shim(new_command.callback) + )) + source_command.callback = create_patch_compnent_shim(source_command.callback) def setup_v2_template_create():