Skip to content

Commit 333d299

Browse files
committed
Fix failing tests
1 parent e899d76 commit 333d299

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

basest/core/encode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
absolute_import, division, print_function, unicode_literals
55
)
66

7+
from ..exceptions import ImproperUsageError
78
from .utils import ints_to_symbols, symbols_to_ints, validate_symbol_tables
89

910

@@ -38,10 +39,10 @@ def encode_raw(input_base, output_base, input_ratio, output_ratio, input_data):
3839
Special validation: if the output base is larger than the input base, then
3940
the length of the input data MUST be an exact multiple of the input ratio.
4041
Otherwise, the data will be corrupted if we continue, so we will raise
41-
ValueError instead.
42+
ImproperUsageError instead.
4243
'''
4344
if input_base < output_base and input_length % input_ratio != 0:
44-
raise ValueError(
45+
raise ImproperUsageError(
4546
'Input data length must be exact multiple of input ratio when '
4647
'output base is larger than input base'
4748
)

0 commit comments

Comments
 (0)