diff options
Diffstat (limited to 'scripts/automation')
-rwxr-xr-x | scripts/automation/trex_control_plane/server/trex_server.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/server/trex_server.py b/scripts/automation/trex_control_plane/server/trex_server.py index 81f3d28f..c1760236 100755 --- a/scripts/automation/trex_control_plane/server/trex_server.py +++ b/scripts/automation/trex_control_plane/server/trex_server.py @@ -14,7 +14,6 @@ import binascii import socket import errno import signal -import binascii from common.trex_status_e import TRexStatus from common.trex_exceptions import * import subprocess @@ -455,10 +454,12 @@ class CTRexServer(object): # adding additional options to the command trex_cmd_options = '' for key, value in kwargs.iteritems(): - tmp_key = key.replace('_','-') + tmp_key = key.replace('_','-').lstrip('-') dash = ' -' if (len(key)==1) else ' --' - if (value == True) and (str(value) != '1'): # checking also int(value) to excape from situation that 1 translates by python to 'True' + if value is True: trex_cmd_options += (dash + tmp_key) + elif value is False: + continue else: trex_cmd_options += (dash + '{k} {val}'.format( k = tmp_key, val = value )) |