mirror of https://github.com/dbcli/pgcli
Dsn parameters not always present. (#1054)
* Dsn parameters not always present.
This commit is contained in:
parent
580639904c
commit
300febccdd
|
@ -10,6 +10,7 @@ Bug fixes:
|
|||
* Load keyring only when keyring is enabled in the config file (#1041). (Thanks: `Zhaolong Zhu`_)
|
||||
* No longer depend on sqlparse as being less than 0.3.0 with the release of sqlparse 0.3.0. (Thanks: `VVelox`_)
|
||||
* Fix the broken support for pgservice . (Thanks: `Xavier Francisco`_)
|
||||
* Connecting using socket is broken in current master. (#1053). (Thanks: `Irina Truong`_)
|
||||
|
||||
Internal:
|
||||
---------
|
||||
|
|
|
@ -265,11 +265,11 @@ class PGExecute(object):
|
|||
# TODO: use actual connection info from psycopg2.extensions.Connection.info as psycopg>2.8 is available and required dependency # noqa
|
||||
dsn_parameters = conn.get_dsn_parameters()
|
||||
|
||||
self.dbname = dsn_parameters['dbname']
|
||||
self.user = dsn_parameters['user']
|
||||
self.dbname = dsn_parameters.get('dbname')
|
||||
self.user = dsn_parameters.get('user')
|
||||
self.password = password
|
||||
self.host = dsn_parameters['host']
|
||||
self.port = dsn_parameters['port']
|
||||
self.host = dsn_parameters.get('host')
|
||||
self.port = dsn_parameters.get('port')
|
||||
self.extra_args = kwargs
|
||||
|
||||
if not self.host:
|
||||
|
|
Loading…
Reference in New Issue