diff options
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py | 14 |
1 files changed, 13 insertions, 1 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 835918d9..9289e513 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 @@ -36,7 +36,7 @@ def import_module_list(modules_list): sys.path.insert(1, full_path) - +# TODO; REFACTOR THIS....it looks horrible def import_platform_dirs (): # handle platform dirs @@ -63,6 +63,18 @@ def import_platform_dirs (): import zmq del zmq return + except: + sys.path.pop(0) + pass + + full_path = os.path.join(TREX_STL_EXT_PATH, 'platform/cel59/32bit') + fix_path = os.path.normcase(full_path) + sys.path.insert(0, full_path) + try: + # try to import and delete it from the namespace + import zmq + del zmq + return except: sys.path.pop(0) |