Fix typo when retrieving PGUSER from environ

introduced in changeset 277c10477f84
This commit is contained in:
Cédric Krier
2015-01-17 17:19:44 +01:00
parent 53194e3784
commit de081a63e8
+1 -1
View File
@@ -192,7 +192,7 @@ class Database(DatabaseInterface):
if res and abs(Database._list_cache_timestamp - now) < timeout:
return res
uri = parse_uri(config.get('database', 'uri'))
db_user = uri.username or os.environment.get('PGUSER')
db_user = uri.username or os.environ.get('PGUSER')
if not db_user and os.name == 'posix':
db_user = pwd.getpwuid(os.getuid())[0]
if db_user: