diff options
Diffstat (limited to 'scripts/automation/trex_control_plane')
3 files changed, 3 insertions, 11 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py index 9e3944d4..68c70119 100755 --- a/scripts/automation/trex_control_plane/client/trex_client.py +++ b/scripts/automation/trex_control_plane/client/trex_client.py @@ -3,12 +3,7 @@ import sys import os -try: - # support import for Python 2 - import outer_packages -except ImportError: - # support import for Python 3 - import client.outer_packages +import client.outer_packages import jsonrpclib from jsonrpclib import ProtocolError, AppError from common.trex_status_e import TRexStatus 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: |