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 {}