summaryrefslogtreecommitdiff
path: root/src/leap/soledad/__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
commit8ec2353d688a6064e5c2cd69745e246c12707b95 (patch)
tree0e660408f3e036372e1fa4223c732104b9bce1a2 /src/leap/soledad/__init__.py
parent940bdd0e06b22fc07faeb3e9a6c9d2963cf69fbb (diff)
Fix OpenPGP key generation.
Diffstat (limited to 'src/leap/soledad/__init__.py')
-rw-r--r--src/leap/soledad/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 9f5d6e22..6a3707ea 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__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(