summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Greenan <kmgreen2@gmail.com>2015-02-28 16:25:56 -0800
committerKevin Greenan <kmgreen2@gmail.com>2015-02-28 16:36:49 -0800
commita01eadae76bb15872f43a8229e6ed697b3f35313 (patch)
tree8d6c24978085eb52441361ef60a84c837b4fd0d9
parentde579b8418847c588b13e4c4c7f616d755c24ff2 (diff)
downloadpyeclib-a01eadae76bb15872f43a8229e6ed697b3f35313.tar.gz
Make liberasurecode enum work with flat XOR codes with HD \in 3,4
-rw-r--r--pyeclib/ec_iface.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyeclib/ec_iface.py b/pyeclib/ec_iface.py
index 5c5173f..fcd3120 100644
--- a/pyeclib/ec_iface.py
+++ b/pyeclib/ec_iface.py
@@ -137,6 +137,8 @@ class ECDriver(object):
raise ECDriverError(
"Invalid number of data fragments (m)")
elif key == "ec_type":
+ if value in ["flat_xor_hd_3", "flat_xor_hd_4"]:
+ value = "flat_xor_hd"
if PyECLib_EC_Types.has_enum(value):
self.ec_type = \
PyECLib_EC_Types.get_by_name(value)