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:
Sarah Hoffmann
2024-09-01 16:17:30 +02:00
parent 72be143cef
commit 882fb16881
4 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ async def conn(table_factory):
table_factory('word',
definition='word_id INT, word_token TEXT, type TEXT, word TEXT, info JSONB')
async with NominatimAPIAsync(environ={}) as api:
async with NominatimAPIAsync() as api:
async with api.begin() as conn:
yield conn