diff options
author | Tushar Gohad <tushar.gohad@intel.com> | 2014-04-19 18:02:18 -0700 |
---|---|---|
committer | Tushar Gohad <tushar.gohad@intel.com> | 2014-04-19 18:02:18 -0700 |
commit | 4f2f2e265024e851955868639521a221be9dd72c (patch) | |
tree | 999b9c641bf24191ba1524ef3c0c499db75dedd9 | |
parent | 3ce39b3b07744b69d41c7981ab3281b0f4ff6769 (diff) | |
download | pyeclib-4f2f2e265024e851955868639521a221be9dd72c.tar.gz |
Deal with self.library_import_str as str()
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
-rw-r--r-- | src/python/pyeclib/ec_iface.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/pyeclib/ec_iface.py b/src/python/pyeclib/ec_iface.py index 5b74b93..a6fa47f 100644 --- a/src/python/pyeclib/ec_iface.py +++ b/src/python/pyeclib/ec_iface.py @@ -80,7 +80,7 @@ class ECDriver(object): self.k = -1 self.m = -1 self.w = -1 - self.library_import_str = -1 + self.library_import_str = None for (key, value) in kwargs.items(): if key == "k": self.k = int(value) @@ -91,6 +91,10 @@ class ECDriver(object): if library_import_str is not None: self.library_import_str = library_import_str + else: + raise ECDriverError( + "Library import string (library_import_str) was not specified " + "and is a required argument!") if self.k < 0: raise ECDriverError( @@ -100,10 +104,6 @@ class ECDriver(object): raise ECDriverError( "Number of parity fragments (m) was not specified " "and is a required argument!") - if self.library_import_str < 0: - raise ECDriverError( - "Library import string (library_import_str) was not specified " - "and is a required argument!") # # We require keyword arguments to prevent ambiguity between EC libs |