rename NotFinalized exception to NotYetFinalized because alex is right
...it does read better that way
diff --git a/cryptography/exceptions.py b/cryptography/exceptions.py
index f2a731f..8b28667 100644
--- a/cryptography/exceptions.py
+++ b/cryptography/exceptions.py
@@ -20,5 +20,5 @@
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 5a4e785..3a27030 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 @@
@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 839ff82..9845555 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -7,7 +7,7 @@
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 @@
)
encryptor = cipher.encryptor()
encryptor.update(b"a" * 16)
- with pytest.raises(NotFinalized):
+ with pytest.raises(NotYetFinalized):
encryptor.tag
encryptor.finalize()
with pytest.raises(AlreadyFinalized):