diff options
author | 2017-02-01 21:13:23 +0200 | |
---|---|---|
committer | 2017-02-02 14:26:12 +0200 | |
commit | 781d71db20b0c5acbe940eff1b1ef2f1b765ce54 (patch) | |
tree | 444ef9944a789eaf7d51729d8e84f0b1ab70bda4 /scripts/automation/trex_control_plane/stl | |
parent | 7b39a77194c736194b40a40fdd19928b98310959 (diff) |
zmq os independent
Change-Id: Iaf5a782be4db26a979a7535454719e8e62b5969a
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py index 306302dc..2c35b024 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py @@ -18,7 +18,7 @@ if not os.path.exists(TREX_STL_EXT_PATH): # the modules required # py-dep requires python2/python3 directories -# arch-dep requires cel59/fedora and 32bit/64bit directories +# arch-dep requires ucs2/ucs4 and 32bit/64bit directories CLIENT_UTILS_MODULES = [ {'name': 'texttable-0.8.4'}, {'name': 'pyyaml-3.11', 'py-dep': True}, {'name': 'scapy-2.3.1', 'py-dep': True}, @@ -26,14 +26,14 @@ CLIENT_UTILS_MODULES = [ {'name': 'texttable-0.8.4'}, ] -def generate_module_path (module, is_python3, is_64bit, is_cel): +def generate_module_path (module, is_python3, is_64bit, is_ucs2): platform_path = [module['name']] if module.get('py-dep'): platform_path.append('python3' if is_python3 else 'python2') if module.get('arch-dep'): - platform_path.append('cel59' if is_cel else 'fedora18') + platform_path.append('ucs2' if is_ucs2 else 'ucs4') platform_path.append('64bit' if is_64bit else '32bit') return os.path.normcase(os.path.join(TREX_STL_EXT_PATH, *platform_path)) @@ -44,11 +44,11 @@ def import_module_list(modules_list): # platform data is_64bit = platform.architecture()[0] == '64bit' is_python3 = (sys.version_info >= (3, 0)) - is_cel = os.path.exists('/etc/system-profile') - + is_ucs2 = (sys.maxunicode == 65535) + # regular modules for p in modules_list: - full_path = generate_module_path(p, is_python3, is_64bit, is_cel) + full_path = generate_module_path(p, is_python3, is_64bit, is_ucs2) if not os.path.exists(full_path): print("Unable to find required module library: '{0}'".format(p['name'])) |