summaryrefslogtreecommitdiff
path: root/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2012-12-20 12:42:34 -0200
committerdrebs <drebs@leap.se>2012-12-20 12:42:34 -0200
commite0164aba2764ed36a24d7638b05c3075852ea3c1 (patch)
tree70c89abf5f018fc60e9903880053c6ff3d6f6570 /__init__.py
parent810d2d6ebffc560900a115c97b0fced8a594faa6 (diff)
Fix OpenPGP key generation.
Diffstat (limited to '__init__.py')
-rw-r--r--__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/__init__.py b/__init__.py
index 9f5d6e22..6a3707ea 100644
--- a/__init__.py
+++ b/__init__.py
@@ -53,9 +53,11 @@ class Soledad(object):
def _has_openpgp_keypair(self):
- if self._gpg.find_key(self._user_email):
+ try:
+ self._gpg.find_key(self._user_email)
return True
- return False
+ except LookupError:
+ return False
def _gen_openpgp_keypair(self):
params = self._gpg.gen_key_input(