summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrina Truong <i.chernyavska@gmail.com>2018-07-19 18:16:23 -0700
committerGitHub <noreply@github.com>2018-07-19 18:16:23 -0700
commitb536c100e84dd27e4e6208dc42737810ed015d44 (patch)
tree23ad14093e8f432ec859e27bebd865347771684e
parent1f98ce91de02a062ba3345c6bed2ebbe97d9e756 (diff)
parent83940d2d06fe53b62f0058ffa601c669919d296c (diff)
Merge pull request #910 from kennydo/kedo-optional-keyring
Fix bug that made `keyring` usage not optional when run headlessly
-rw-r--r--AUTHORS3
-rw-r--r--pgcli/main.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 72c9124a..dff41f7c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -82,7 +82,8 @@ Contributors:
* Matthieu Guilbert
* Alexandr Korsak
* Saif Hakim
- * Artur Balabanov
+ * Artur Balabanov
+ * Kenny Do
Creator:
diff --git a/pgcli/main.py b/pgcli/main.py
index 25c2f5d7..3d25a05d 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -442,7 +442,7 @@ class PGCli(object):
if passwd:
try:
keyring.set_password('pgcli', key, passwd)
- except keyring.errors.InitError:
+ except (keyring.errors.InitError, RuntimeError):
pass
except (OperationalError, InterfaceError) as e:
if ('no password supplied' in utf8tounicode(e.args[0]) and