mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Updates Blob Exception
Blob was raising general Exceptions when a ValueError should be a better match
This commit is contained in:
@@ -14,12 +14,12 @@ class Blob:
|
||||
|
||||
# FIXME: We only support SHA256 for now
|
||||
if self.hash_function.upper() not in SUPPORTED_HASH_FUNCTIONS:
|
||||
raise Exception("Hash function not supported ({}). Supported Hash functions: {}"
|
||||
raise ValueError("Hash function not supported ({}). Supported Hash functions: {}"
|
||||
.format(self.hash_function, SUPPORTED_HASH_FUNCTIONS))
|
||||
|
||||
# FIXME: We only support AES-GCM-128 for now
|
||||
if self.cipher.upper() not in SUPPORTED_CIPHERS:
|
||||
raise Exception("Cipher not supported ({}). Supported ciphers: {}".format(self.hash_function,
|
||||
raise ValueError("Cipher not supported ({}). Supported ciphers: {}".format(self.hash_function,
|
||||
SUPPORTED_CIPHERS))
|
||||
|
||||
def encrypt(self, tx_id):
|
||||
|
||||
Reference in New Issue
Block a user