upload_secrets: call update_check directly without introspection
All checks were successful
checks-impure / test (pull_request) Successful in 1m59s
checks / test (pull_request) Successful in 2m49s

This commit is contained in:
Jörg Thalheim 2024-02-16 14:57:01 +01:00
parent 87f301122e
commit 714f3b0378

View File

@ -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