diff --git a/triplesec/__init__.py b/triplesec/__init__.py index 665e830..484cd44 100644 --- a/triplesec/__init__.py +++ b/triplesec/__init__.py @@ -103,7 +103,7 @@ def encrypt_ascii(self, data, key=None, v=None, extra_bytes=0, "hqx": binascii.b2a_hqx} digestor = digests.get(digest) if not digestor: - TripleSecError(u"Digestor not supported.") + raise TripleSecError(u"Digestor not supported.") binary_result = self.encrypt(data, key, v, extra_bytes) result = digestor(binary_result) @@ -180,7 +180,7 @@ def decrypt_ascii(self, ascii_string, key=None, digest="hex"): "hqx": binascii.a2b_hqx} digestor = digests.get(digest) if not digestor: - TripleSecError(u"Digestor not supported.") + raise TripleSecError(u"Digestor not supported.") binary_string = digestor(ascii_string) result = self.decrypt(binary_string, key)