wcsinstd: do not pass empty parameters to psycopg2 connect
This commit is contained in:
parent
59a6ccac5e
commit
833ba5e237
|
@ -94,8 +94,12 @@ class DeployInstance(object):
|
|||
else:
|
||||
database_name = '%s_%s' % (database_name, domain_table_name)
|
||||
|
||||
postgresql_cfg = {}
|
||||
for k, v in wcs_cfg['postgresql'].items():
|
||||
if v:
|
||||
postgresql_cfg[k] = v
|
||||
try:
|
||||
pgconn = psycopg2.connect(**wcs_cfg['postgresql'])
|
||||
pgconn = psycopg2.connect(**postgresql_cfg)
|
||||
except psycopg2.Error:
|
||||
# XXX: log
|
||||
raise
|
||||
|
|
Reference in New Issue