diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-21 11:21:35 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-29 17:19:45 -0600 |
commit | cc9ec987e82d1c4e2d42e6ef41664a090425287c (patch) | |
tree | 3385213e2e6606a044ad9f7cb258650110fab6a3 | |
parent | a5e1081098be6734f8abe31ce0b84c72490f4cb3 (diff) | |
download | cryptography-cc9ec987e82d1c4e2d42e6ef41664a090425287c.tar.gz cryptography-cc9ec987e82d1c4e2d42e6ef41664a090425287c.tar.bz2 cryptography-cc9ec987e82d1c4e2d42e6ef41664a090425287c.zip |
rename NotFinalized exception to NotYetFinalized because alex is right
...it does read better that way
-rw-r--r-- | cryptography/exceptions.py | 2 | ||||
-rw-r--r-- | cryptography/hazmat/primitives/ciphers/base.py | 6 | ||||
-rw-r--r-- | tests/hazmat/primitives/utils.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cryptography/exceptions.py b/cryptography/exceptions.py index f2a731f0..8b286679 100644 --- a/cryptography/exceptions.py +++ b/cryptography/exceptions.py @@ -20,5 +20,5 @@ class AlreadyFinalized(Exception): pass -class NotFinalized(Exception): +class NotYetFinalized(Exception): pass diff --git a/cryptography/hazmat/primitives/ciphers/base.py b/cryptography/hazmat/primitives/ciphers/base.py index 5a4e7850..3a27030a 100644 --- a/cryptography/hazmat/primitives/ciphers/base.py +++ b/cryptography/hazmat/primitives/ciphers/base.py @@ -14,7 +14,7 @@ from __future__ import absolute_import, division, print_function from cryptography import utils -from cryptography.exceptions import AlreadyFinalized, NotFinalized +from cryptography.exceptions import AlreadyFinalized, NotYetFinalized from cryptography.hazmat.primitives import interfaces @@ -87,6 +87,6 @@ class _AEADCipherContext(_CipherContext): @property def tag(self): if self._ctx is not None: - raise NotFinalized("You must finalize encryption before " - "getting the tag") + raise NotYetFinalized("You must finalize encryption before " + "getting the tag") return self._tag diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 839ff822..98455556 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -7,7 +7,7 @@ from cryptography.hazmat.bindings import _ALL_BACKENDS from cryptography.hazmat.primitives import hashes, hmac from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.exceptions import ( - AlreadyFinalized, NotFinalized, + AlreadyFinalized, NotYetFinalized, ) from ...utils import load_vectors_from_file @@ -333,7 +333,7 @@ def aead_use_after_finalize_test(backend, cipher_factory, mode_factory, ) encryptor = cipher.encryptor() encryptor.update(b"a" * 16) - with pytest.raises(NotFinalized): + with pytest.raises(NotYetFinalized): encryptor.tag encryptor.finalize() with pytest.raises(AlreadyFinalized): |