diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-02-02 11:57:17 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-02-02 14:26:33 +0200 |
commit | cfcbe7a0d5085af3d5fe1c9127b9237fa66408b2 (patch) | |
tree | 9ffa28bd77dc6e43aaed1ee2f93d48f2ffaf9bb8 /scripts/automation/trex_control_plane/stl | |
parent | 781d71db20b0c5acbe940eff1b1ef2f1b765ce54 (diff) |
fixed missing .so files due to ignored by .gitignore + fixed path
Change-Id: If014548f3d007f9eda6d54332ac04952ea91f751
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/services/scapy_server/scapy_zmq_client.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_zmq_client.py b/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_zmq_client.py index 18d32272..5c23a1a8 100644 --- a/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_zmq_client.py +++ b/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_zmq_client.py @@ -1,9 +1,15 @@ import sys
import os
-python2_zmq_path = os.path.abspath(os.path.join(os.pardir,os.pardir,os.pardir,os.pardir,
- os.pardir,'external_libs','pyzmq-14.5.0','python2','fedora18','64bit'))
-sys.path.append(python2_zmq_path)
+
+python_ver = 'python%s' % sys.version_info.major
+ucs_ver = 'ucs2' if sys.maxunicode == 65535 else 'ucs4'
+
+zmq_path = os.path.abspath(os.path.join(os.pardir,os.pardir,os.pardir,os.pardir,
+ os.pardir,'external_libs','pyzmq-14.5.0', python_ver, ucs_ver,'64bit'))
+
+if zmq_path not in sys.path:
+ sys.path.append(zmq_path)
import zmq
import json
|