From e5afd4a12f4e0c8958dfc63355453e8ab45c0903 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Tue, 23 Jul 2024 00:47:35 +0200 Subject: [PATCH] Code quality --- secret_loader/__init__.py | 5 +++-- test/__init__.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 test/__init__.py diff --git a/secret_loader/__init__.py b/secret_loader/__init__.py index 5e76300..3a5e517 100644 --- a/secret_loader/__init__.py +++ b/secret_loader/__init__.py @@ -194,7 +194,7 @@ class SecretLoader: return None cmd = ['pass', 'show', f'{self.pass_folder}/{secret_name.lower()}'] - process = subprocess.run(cmd, capture_output=True) + process = subprocess.run(cmd, capture_output=True, check=True) if process.returncode: return None @@ -240,5 +240,6 @@ class SecretLoader: solutions_list = '\n'.join([f'* {s}' for s in solutions_list]) return ERROR_MESSAGE_FORMAT.format( - secret_name=secret_name, solutions_list=solutions_list, + secret_name=secret_name, + solutions_list=solutions_list, ) diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..403f980 --- /dev/null +++ b/test/__init__.py @@ -0,0 +1 @@ +# Dummy