forked from hans/Nominatim
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:
@@ -72,7 +72,7 @@ async def conn(table_factory, temp_db_cursor):
|
||||
temp_db_cursor.execute("""CREATE OR REPLACE FUNCTION make_standard_name(name TEXT)
|
||||
RETURNS TEXT AS $$ SELECT lower(name); $$ LANGUAGE SQL;""")
|
||||
|
||||
async with NominatimAPIAsync(environ={}) as api:
|
||||
async with NominatimAPIAsync() as api:
|
||||
async with api.begin() as conn:
|
||||
yield conn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user