diff options
author | David Reid <dreid@dreid.org> | 2013-11-13 10:37:47 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-13 10:37:47 -0800 |
commit | 11e8cc7cf05967f203d5e7084756ccc28e43bdf7 (patch) | |
tree | 00ffb908a4b86f3965f98fc3a5627061b2a5bdc3 /cryptography | |
parent | 6392a9c63ce134c4aceefb8a4eb9da2fa7f4f390 (diff) | |
download | cryptography-11e8cc7cf05967f203d5e7084756ccc28e43bdf7.tar.gz cryptography-11e8cc7cf05967f203d5e7084756ccc28e43bdf7.tar.bz2 cryptography-11e8cc7cf05967f203d5e7084756ccc28e43bdf7.zip |
Import AlreadyFinalized instead of exceptions.
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/primitives/hashes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/hashes.py b/cryptography/hazmat/primitives/hashes.py index f85d36a0..adf64d30 100644 --- a/cryptography/hazmat/primitives/hashes.py +++ b/cryptography/hazmat/primitives/hashes.py @@ -15,7 +15,7 @@ from __future__ import absolute_import, division, print_function import six -from cryptography import exceptions +from cryptography.exceptions import AlreadyFinalized from cryptography.hazmat.primitives import interfaces @@ -39,14 +39,14 @@ class Hash(object): def update(self, data): if self._ctx is None: - raise exceptions.AlreadyFinalized() + raise AlreadyFinalized() if isinstance(data, six.text_type): raise TypeError("Unicode-objects must be encoded before hashing") self._ctx.update(data) def copy(self): if self._ctx is None: - raise exceptions.AlreadyFinalized() + raise AlreadyFinalized() return Hash( self.algorithm, backend=self._backend, ctx=self._ctx.copy() ) |