From 0cf001ead93e8295e067aa714478109b2582c9a7 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Wed, 12 Jun 2024 23:38:46 +0200 Subject: [PATCH] Fix style --- secret_loader/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/secret_loader/__init__.py b/secret_loader/__init__.py index dc459de..9278421 100644 --- a/secret_loader/__init__.py +++ b/secret_loader/__init__.py @@ -17,7 +17,9 @@ ENV_KEY_VAULT_MOUNT_POINT = 'VAULT_MOUNT_POINT' class SecretLoader: - """Priority order: + """System for loading secrets from a variety of sources. + + Priority order: 0. Hardcoded values. This is purely for prototyping. 1. Files pointed to by environment variables. @@ -70,8 +72,7 @@ class SecretLoader: filepath = f'./secrets/{env_key.lower()}' try: with open(filepath) as f: - value = f.read().strip() - return value + return f.read().strip() except Exception: return None