summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2014-11-19 09:34:16 -0700
committerTushar Gohad <tushar.gohad@intel.com>2014-11-19 09:34:16 -0700
commit5026e16ab15e0247361e5d8cc2b14ed3fa4d4b63 (patch)
tree41c6e0f1218987c525325c26861e5665d684c85c /tools
parent3254a95f0bcde0f0626569d390c0b45675d6cfd2 (diff)
downloadpyeclib-5026e16ab15e0247361e5d8cc2b14ed3fa4d4b63.tar.gz
Make library_import_str arg to ECDriver conditional
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/pyeclib_conf_tool.py6
-rw-r--r--tools/pyeclib_decode.py8
-rw-r--r--tools/pyeclib_encode.py9
-rw-r--r--tools/pyeclib_fragments_needed.py4
4 files changed, 4 insertions, 23 deletions
diff --git a/tools/pyeclib_conf_tool.py b/tools/pyeclib_conf_tool.py
index 84cd957..c21495a 100644
--- a/tools/pyeclib_conf_tool.py
+++ b/tools/pyeclib_conf_tool.py
@@ -58,12 +58,10 @@
# (limit 10)
#
-import pyeclib
from pyeclib.ec_iface import ECDriver
import random
import string
import sys
-import os
import argparse
import time
import math
@@ -238,9 +236,7 @@ for scheme in schemes:
string.ascii_uppercase + string.digits) for x in range(args.s))
try:
- ec_driver = ECDriver(
- "pyeclib.core.ECPyECLibDriver",
- k=scheme.k, m=scheme.m, ec_type=scheme.ec_type)
+ ec_driver = ECDriver(k=scheme.k, m=scheme.m, ec_type=scheme.ec_type)
except Exception as e:
print("Scheme %s is not defined (%s)." % (scheme, e))
continue
diff --git a/tools/pyeclib_decode.py b/tools/pyeclib_decode.py
index 4ec7f52..707a63a 100644
--- a/tools/pyeclib_decode.py
+++ b/tools/pyeclib_decode.py
@@ -21,12 +21,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import pyeclib
from pyeclib.ec_iface import ECDriver
-import random
-import string
-import sys
-import os
import argparse
parser = argparse.ArgumentParser(description='Decoder for PyECLib.')
@@ -44,8 +39,7 @@ print("ec_type = %s" % args.ec_type)
print("fragments = %s" % args.fragments)
print("filename = %s" % args.filename)
-ec_driver = ECDriver(
- "pyeclib.core.ECPyECLibDriver", k=args.k, m=args.m, ec_type=args.ec_type)
+ec_driver = ECDriver(k=args.k, m=args.m, ec_type=args.ec_type)
fragment_list = []
diff --git a/tools/pyeclib_encode.py b/tools/pyeclib_encode.py
index 28563c5..093d1cf 100644
--- a/tools/pyeclib_encode.py
+++ b/tools/pyeclib_encode.py
@@ -21,12 +21,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import pyeclib
from pyeclib.ec_iface import ECDriver
-import random
-import string
-import sys
-import os
import argparse
parser = argparse.ArgumentParser(description='Encoder for PyECLib.')
@@ -43,9 +38,7 @@ print("k = %d, m = %d" % (args.k, args.m))
print("ec_type = %s" % args.ec_type)
print("filename = %s" % args.filename)
-ec_driver = ECDriver(
- "pyeclib.core.ECPyECLibDriver",
- k=args.k, m=args.m, ec_type=args.ec_type)
+ec_driver = ECDriver(k=args.k, m=args.m, ec_type=args.ec_type)
# read
with open(("%s/%s" % (args.file_dir, args.filename)), "rb") as fp:
diff --git a/tools/pyeclib_fragments_needed.py b/tools/pyeclib_fragments_needed.py
index 92fd0b3..48d1bdc 100644
--- a/tools/pyeclib_fragments_needed.py
+++ b/tools/pyeclib_fragments_needed.py
@@ -40,9 +40,7 @@ parser.add_argument('missing_fragments', type=int, metavar='missing_fragment',
args = parser.parse_args()
-ec_driver = ECDriver(
- "pyeclib.core.ECPyECLibDriver",
- k=args.k, m=args.m, ec_type=args.ec_type)
+ec_driver = ECDriver(k=args.k, m=args.m, ec_type=args.ec_type)
fragments_needed = ec_driver.fragments_needed(args.missing_fragments)