summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-23 10:43:40 +0200
committerimarom <imarom@cisco.com>2016-03-23 13:01:10 +0200
commit89a2be8247936e2d3d8323c0e51a86c198a879a2 (patch)
tree3433141e9eb84d35816c938308347686608ae6a3 /scripts/automation/trex_control_plane/stl/trex_stl_lib
parenta380bf1055c6cb4432b1c928f73a3ca3ada52d9d (diff)
yes...again Python3....
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py3
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py4
2 files changed, 2 insertions, 5 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 fe4bad62..c614c4bd 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
@@ -42,10 +42,7 @@ def import_module_list(modules_list):
is_64bit = platform.architecture()[0] == '64bit'
is_python3 = (sys.version_info >= (3, 0))
is_cel = os.path.exists('/etc/system-profile')
-
-
-
# regular modules
for p in modules_list:
full_path = generate_module_path(p, is_python3, is_64bit, is_cel)
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index 16ffad43..eed20485 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -530,9 +530,9 @@ class STLStream(object):
good_printable.remove("'")
if type(data) is str:
- new_data = ''.join([c if c in good_printable else r'\x{0:02x}'.format(ord(c)) for c in x])
+ new_data = ''.join([c if c in good_printable else r'\x{0:02x}'.format(ord(c)) for c in data])
else:
- new_data = ''.join([chr(c) if chr(c) in good_printable else r'\x{0:02x}'.format(c) for c in x])
+ new_data = ''.join([chr(c) if chr(c) in good_printable else r'\x{0:02x}'.format(c) for c in data])
payload_start = packet_command.find("Raw(load='")
if payload_start != -1: