Merge "Fix error message with invalid parity number"
This commit is contained in:
@@ -168,7 +168,7 @@ class ECDriver(object):
|
|||||||
self.m = positive_int_value(value)
|
self.m = positive_int_value(value)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ECDriverError(
|
raise ECDriverError(
|
||||||
"Invalid number of data fragments (m)")
|
"Invalid number of parity fragments (m)")
|
||||||
elif key == "ec_type":
|
elif key == "ec_type":
|
||||||
if value in ["flat_xor_hd", "flat_xor_hd_3", "flat_xor_hd_4"]:
|
if value in ["flat_xor_hd", "flat_xor_hd_3", "flat_xor_hd_4"]:
|
||||||
if value == "flat_xor_hd" or value == "flat_xor_hd_3":
|
if value == "flat_xor_hd" or value == "flat_xor_hd_3":
|
||||||
|
@@ -143,7 +143,7 @@ class TestPyECLibDriver(unittest.TestCase):
|
|||||||
# m is smaller than 1
|
# m is smaller than 1
|
||||||
ECDriver(ec_type=ec_type, k=1, m=-100)
|
ECDriver(ec_type=ec_type, k=1, m=-100)
|
||||||
self.assertEqual(str(err_context.exception),
|
self.assertEqual(str(err_context.exception),
|
||||||
"Invalid number of data fragments (m)")
|
"Invalid number of parity fragments (m)")
|
||||||
|
|
||||||
def test_valid_ec_types(self):
|
def test_valid_ec_types(self):
|
||||||
# Build list of available types and compare to VALID_EC_TYPES
|
# Build list of available types and compare to VALID_EC_TYPES
|
||||||
|
Reference in New Issue
Block a user