mirror of https://github.com/dbcli/pgcli
make keyring optional
This commit is contained in:
parent
a274c731fc
commit
2ce2a87f37
|
@ -18,6 +18,7 @@ Bug Fixes:
|
|||
----------
|
||||
* Disable pager when using \watch (#837). (Thanks: `Jason Ribeiro`_)
|
||||
* Don't offer to reconnect when we can't change a param in realtime (#807). (Thanks: `Amjith Ramanujam`_)
|
||||
* Make keyring optional. (Thanks: `Dick Marinus`_)
|
||||
|
||||
1.9.1:
|
||||
======
|
||||
|
|
|
@ -433,7 +433,10 @@ class PGCli(object):
|
|||
pgexecute = PGExecute(database, user, passwd, host, port, dsn,
|
||||
application_name='pgcli', **kwargs)
|
||||
if passwd:
|
||||
keyring.set_password('pgcli', key, passwd)
|
||||
try:
|
||||
keyring.set_password('pgcli', key, passwd)
|
||||
except keyring.errors.InitError:
|
||||
pass
|
||||
except (OperationalError, InterfaceError) as e:
|
||||
if ('no password supplied' in utf8tounicode(e.args[0]) and
|
||||
auto_passwd_prompt):
|
||||
|
|
Loading…
Reference in New Issue