diff options
author | imarom <imarom@cisco.com> | 2016-03-23 10:43:40 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-03-23 13:01:10 +0200 |
commit | 89a2be8247936e2d3d8323c0e51a86c198a879a2 (patch) | |
tree | 3433141e9eb84d35816c938308347686608ae6a3 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | |
parent | a380bf1055c6cb4432b1c928f73a3ca3ada52d9d (diff) |
yes...again Python3....
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |