have ADDRESS_LEVEL_CONFIG use load_sub_configuration

This means that relative paths now are looked up in the
project directory.
This commit is contained in:
Sarah Hoffmann
2021-10-22 16:31:33 +02:00
parent c77df2d1eb
commit 0ae8d7ac08
8 changed files with 33 additions and 34 deletions

View File

@@ -56,12 +56,6 @@ class Configuration:
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.
# They may still be overwritten by environment variables.
if not self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG']:
self._config['NOMINATIM_ADDRESS_LEVEL_CONFIG'] = \
str(config_dir / 'address-levels.json')
class _LibDirs:
pass