mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
restrict use of os.environ in Configuration
Only use the OS environment, when the environ parameter is set to None. Currently it would use the OS env on an empty dict.
This commit is contained in:
@@ -61,7 +61,7 @@ class Configuration:
|
||||
|
||||
def __init__(self, project_dir: Optional[Union[Path, str]],
|
||||
environ: Optional[Mapping[str, str]] = None) -> None:
|
||||
self.environ = environ or os.environ
|
||||
self.environ = os.environ if environ is None else environ
|
||||
self.config_dir = paths.CONFIG_DIR
|
||||
self._config = dotenv_values(str(self.config_dir / 'env.defaults'))
|
||||
if project_dir is not None:
|
||||
|
||||
Reference in New Issue
Block a user