From 5606101ce80063da40e7fa23ae993284d449c64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Apr 2024 13:56:07 +0200 Subject: [PATCH] sops: also log content type on error --- pkgs/clan-cli/clan_cli/secrets/sops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/secrets/sops.py b/pkgs/clan-cli/clan_cli/secrets/sops.py index 5fce40bd..c12c1369 100644 --- a/pkgs/clan-cli/clan_cli/secrets/sops.py +++ b/pkgs/clan-cli/clan_cli/secrets/sops.py @@ -175,7 +175,7 @@ def encrypt_file( with open(f.name, "w") as fd: shutil.copyfileobj(content, fd) else: - raise ClanError("Invalid content type") + raise ClanError(f"Invalid content type: {type(content)}") # we pass an empty manifest to pick up existing configuration of the user args = ["sops", "--config", str(manifest)] args.extend(["-i", "--encrypt", str(f.name)])