forked from p15670423/monkey
Island: Remove SizeError and use ValueError
This commit is contained in:
parent
7f60fb4419
commit
74cb986e36
|
@ -15,4 +15,3 @@ from .data_store_encryptor import (
|
|||
reset_datastore_encryptor,
|
||||
)
|
||||
from .encryption_key_types import EncryptionKey32Bytes
|
||||
from .errors import SizeError
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
from .errors import SizeError
|
||||
|
||||
|
||||
class EncryptionKey32Bytes(bytes):
|
||||
def __init__(self, key: bytes):
|
||||
if len(key) == 32:
|
||||
self.key = key
|
||||
else:
|
||||
raise SizeError("Key size should be 32 bytes.")
|
||||
raise ValueError("Key size should be 32 bytes.")
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
class SizeError(Exception):
|
||||
"""
|
||||
Raised when an argument is not of the expected size during object creation.
|
||||
"""
|
||||
|
||||
pass
|
Loading…
Reference in New Issue