More with uppercase

This commit is contained in:
Benjamin Bohard 2020-04-02 16:58:53 +02:00
parent 99168f5715
commit 191797d239
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ CACHE_ROOT_PATH = environ.get('CACHE_ROOT_PATH', '/var/cache/risotto')
SRV_SEED_PATH = environ.get('SRV_SEED_PATH', '/srv/seed')
def dsn_factory(database, user, password, address=db_address):
def dsn_factory(database, user, password, address=DB_ADDRESS):
mangled_address = '/var/run/postgresql' if address == 'localhost' else address
return f'postgres:///{database}?host={mangled_address}/&user={user}&password={password}'