diff options
author | Kali Kaneko <kali@leap.se> | 2015-07-23 14:01:43 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-07-23 14:03:01 -0400 |
commit | 6cdcb2e32ff0876847c6ab4aba99dfc087da0617 (patch) | |
tree | 9c7fb55d86d97c6a385bbc39548aa70d92d92fd3 /client/src/leap/soledad/client/secrets.py | |
parent | e35341d57ac5fa87be5de64d62e219a105389c4c (diff) |
[style] pep8 cleanup
to make all CIs happy :)
Diffstat (limited to 'client/src/leap/soledad/client/secrets.py')
-rw-r--r-- | client/src/leap/soledad/client/secrets.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/leap/soledad/client/secrets.py b/client/src/leap/soledad/client/secrets.py index e89e21aa..3b6755e1 100644 --- a/client/src/leap/soledad/client/secrets.py +++ b/client/src/leap/soledad/client/secrets.py @@ -50,12 +50,14 @@ logger = logging.getLogger(name=__name__) class SecretsException(Exception): + """ Generic exception type raised by this module. """ class NoStorageSecret(SecretsException): + """ Raised when trying to use a storage secret but none is available. """ @@ -63,6 +65,7 @@ class NoStorageSecret(SecretsException): class PassphraseTooShort(SecretsException): + """ Raised when trying to change the passphrase but the provided passphrase is too short. @@ -70,6 +73,7 @@ class PassphraseTooShort(SecretsException): class BootstrapSequenceError(SecretsException): + """ Raised when an attempt to generate a secret and store it in a recovery document on server failed. @@ -81,6 +85,7 @@ class BootstrapSequenceError(SecretsException): # class SoledadSecrets(object): + """ Soledad secrets handler. @@ -449,10 +454,11 @@ class SoledadSecrets(object): sha256).hexdigest() else: raise crypto.UnknownMacMethodError('Unknown MAC method: %s.' % - data[crypto.MAC_METHOD_KEY]) + data[crypto.MAC_METHOD_KEY]) if mac != data[crypto.MAC_KEY]: - raise crypto.WrongMacError('Could not authenticate recovery document\'s ' - 'contents.') + raise crypto.WrongMacError( + 'Could not authenticate recovery document\'s ' + 'contents.') # include secrets in the secret pool. secret_count = 0 secrets = data[self.STORAGE_SECRETS_KEY].items() |