1
0
Fork 0

Possibly fix #1040. (#1042)

Fix #1040
This commit is contained in:
Irina Truong 2019-04-28 00:00:40 -06:00 committed by Dick Marinus
parent eef0e0d65c
commit 9a53fe859a
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Bug fixes:
----------
* Escape switches to VI navigation mode when not canceling completion popup. (Thanks: `Nathan Verzemnieks`_)
* Allow application_name to be overridden. (Thanks: `raylu`_)
* Fix for "no attribute KeyringLocked" (#1040). (Thanks: `Irina Truong`_)
2.1.0
=====

View File

@ -47,7 +47,8 @@ from pgspecial.main import (PGSpecial, NO_QUERY, PAGER_OFF, PAGER_LONG_OUTPUT)
import pgspecial as special
try:
import keyring
except ImportError:
except:
# pep8 will be unhappy about this. But keyring is optional, and we better disable it if it won't load.
keyring = None
from .pgcompleter import PGCompleter
from .pgtoolbar import create_toolbar_tokens_func
@ -478,9 +479,8 @@ class PGCli(object):
try:
keyring.set_password('pgcli', key, passwd)
except (
keyring.errors.InitError,
RuntimeError,
keyring.errors.KeyringLocked
keyring.errors.KeyringError,
) as e:
click.secho(
keyring_error_message.format(