summaryrefslogtreecommitdiff
path: root/src/leap/soledad/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-15 19:53:53 -0300
committerdrebs <drebs@leap.se>2013-05-15 19:53:53 -0300
commit7e6f458af4c7b51f414d6303942fec10dd56d2d3 (patch)
treed29bbbbe4d65db25f69f71a550097b5037d938db /src/leap/soledad/__init__.py
parenta1df8fe814d9733cfc4aea635864fc9fe7383962 (diff)
Fix pep8 style.
Diffstat (limited to 'src/leap/soledad/__init__.py')
-rw-r--r--src/leap/soledad/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index e3313ffe..7a3540bf 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -286,8 +286,8 @@ class Soledad(object):
'Found cryptographic secrets in shared recovery '
'database.')
self.import_recovery_document(
- doc.content[self.SECRET_KEY],
- passphrase=self._passphrase)
+ doc.content[self.SECRET_KEY],
+ passphrase=self._passphrase)
else:
# there are no secrets in server also, so generate a secret.
logger.info(
@@ -398,14 +398,14 @@ class Soledad(object):
"""
# does the file exist in disk?
if not os.path.isfile(self._secrets_path):
- raise IOError('File does not exist: %s' % self._secrets_path)
+ raise IOError('File does not exist: %s' % self._secrets_path)
# read storage secrets from file
content = None
with open(self._secrets_path, 'r') as f:
content = json.loads(f.read())
self._secrets = content[self.STORAGE_SECRETS_KEY]
# choose first secret if no secret_id was given
- if self._secret_id == None:
+ if self._secret_id is None:
self._set_secret_id(self._secrets.items()[0][0])
# check secret is isncrypted
if not self._crypto.is_encrypted_sym(
@@ -429,7 +429,7 @@ class Soledad(object):
return True
except DecryptionFailed:
logger.error('Could not decrypt storage secret.')
- except IOError, e:
+ except IOError, e:
logger.error('IOError: %s' % str(e))
return False