From 714f3b03784e0f659f5b772138176473a316b126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 16 Feb 2024 14:57:01 +0100 Subject: [PATCH] upload_secrets: call update_check directly without introspection --- pkgs/clan-cli/clan_cli/secrets/upload.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/secrets/upload.py b/pkgs/clan-cli/clan_cli/secrets/upload.py index 420136e3..cb8d513a 100644 --- a/pkgs/clan-cli/clan_cli/secrets/upload.py +++ b/pkgs/clan-cli/clan_cli/secrets/upload.py @@ -15,11 +15,9 @@ def upload_secrets(machine: Machine) -> None: secrets_module = importlib.import_module(machine.secrets_module) secret_store = secrets_module.SecretStore(machine=machine) - update_check = getattr(secret_store, "update_check", None) - if callable(update_check): - if update_check(): - log.info("Secrets already up to date") - return + if secret_store.update_check(): + log.info("Secrets already up to date") + return with TemporaryDirectory() as tempdir: secret_store.upload(Path(tempdir)) host = machine.target_host