Ignore empty connection settings

This commit is contained in:
Nick Hall 2017-09-25 23:00:10 +01:00
parent 95376f9eff
commit c9eee3b471

View File

@ -90,7 +90,9 @@ class PostgreSQL(DBAPI):
dbkwargs = {} dbkwargs = {}
for key in config_mgr.get_section_settings('database'): for key in config_mgr.get_section_settings('database'):
dbkwargs[key] = config_mgr.get('database.' + key) value = config_mgr.get('database.' + key)
if value:
dbkwargs[key] = value
try: try:
self.dbapi = Connection(**dbkwargs) self.dbapi = Connection(**dbkwargs)