From ab1468788eeb11c285c5065808db989692cb289a Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Sun, 25 Jul 2021 14:46:27 +0200 Subject: [PATCH] bugfix --- src/soupjobs/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soupjobs/settings.py b/src/soupjobs/settings.py index 296bc5d..8c351ad 100644 --- a/src/soupjobs/settings.py +++ b/src/soupjobs/settings.py @@ -19,7 +19,7 @@ class OutputFormat(str, Enum): class Settings(BaseSettings): - CONFIG_FILE: Optional[Path] = os.getenv(CONFIG_FILE_ENV_VAR, CONFIG_FILE_PLACEHOLDER) + _CONFIG_FILE: Optional[Path] = os.getenv(CONFIG_FILE_ENV_VAR, CONFIG_FILE_PLACEHOLDER) entry_urls: Union[str, List[str]] = [] regex_mode: bool = False @@ -61,7 +61,7 @@ class Settings(BaseSettings): def yaml_settings(settings_obj: Settings) -> Dict[str, Any]: try: - with open(settings_obj.CONFIG_FILE, 'r') as f: + with open(getattr(settings_obj, '_CONFIG_FILE'), 'r') as f: config = yaml.safe_load(f) except FileNotFoundError: return {}