summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/__init__.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 96b05628..5b2f5fc1 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -324,15 +324,11 @@ class Soledad(object):
if not self._has_symkey():
raise KeyDoesNotExist("Tried to load key for symmetric "
"encryption but it does not exist on disk.")
- try:
- with open(self._config.get_secret_path()) as f:
- self._symkey = \
- self._crypto.decrypt_sym(
- f.read(), passphrase=self._passphrase)
- self._crypto.symkey = self._symkey
- except IOError:
- raise IOError('Failed to open secret file %s.' %
- self._config.get_secret_path())
+ with open(self._config.get_secret_path()) as f:
+ self._symkey = \
+ self._crypto.decrypt_sym(
+ f.read(), passphrase=self._passphrase)
+ self._crypto.symkey = self._symkey
def _gen_symkey(self):
"""