diff --git a/src/config/definitions.py b/src/config/definitions.py index 8e97a59..b071e56 100644 --- a/src/config/definitions.py +++ b/src/config/definitions.py @@ -1,3 +1,4 @@ import os -ROOT_PATH = project_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) \ No newline at end of file +ROOT_PATH = project_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) +SECRETS_FILE_PATH = ROOT_PATH + '/secrets/auth.yaml' \ No newline at end of file diff --git a/src/modules/auth_manager.py b/src/modules/auth_manager.py index f54f4b4..1d744b6 100644 --- a/src/modules/auth_manager.py +++ b/src/modules/auth_manager.py @@ -7,16 +7,11 @@ from src.config import definitions username: str = None password: str = None - -auth_secret_file_location = definitions.ROOT_PATH + '/secrets/auth.yaml' - -auth_secret_file_location - def load_username_password_from_secrets(): global username global password - with open(auth_secret_file_location, 'r') as auth_file: + with open(definitions.SECRETS_FILE_PATH, 'r') as auth_file: auth_object = yaml.safe_load(auth_file) username = auth_object['username']