X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/616789bbccd4b35cc643b20c5af3c9835eb22643..3f73a363f42cb3cb6627ddcea371e3a22810daa6:/nominatim/config.py?ds=inline diff --git a/nominatim/config.py b/nominatim/config.py index d1df17b7..72aaf0bd 100644 --- a/nominatim/config.py +++ b/nominatim/config.py @@ -30,7 +30,7 @@ class Configuration: self.project_dir = project_dir self.config_dir = config_dir self._config = dotenv_values(str((config_dir / 'env.defaults').resolve())) - if project_dir is not None: + if project_dir is not None and (project_dir / '.env').is_file(): self._config.update(dotenv_values(str((project_dir / '.env').resolve()))) # Add defaults for variables that are left empty to set the default. @@ -39,7 +39,7 @@ class Configuration: self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG'] = \ str(config_dir / 'address-levels.json') - class _LibDirs: # pylint: disable=too-few-public-methods + class _LibDirs: pass self.lib_dir = _LibDirs()