summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/misc_methods.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-01-07 23:58:22 +0200
committerHanoh Haim <hhaim@cisco.com>2016-01-07 23:58:22 +0200
commit8db09096b9dcf030b7dc744fbd7ee463d8e6fd1b (patch)
tree8de1422ac003e403889b2b248009431aa1176dd3 /scripts/automation/regression/misc_methods.py
parent7e37a0aabbd351aa899bf7bdb2327eaa61733095 (diff)
parent79b2a5ea59c3b420988891b9f3751579bfbe8e0e (diff)
Merge
Diffstat (limited to 'scripts/automation/regression/misc_methods.py')
-rwxr-xr-xscripts/automation/regression/misc_methods.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/automation/regression/misc_methods.py b/scripts/automation/regression/misc_methods.py
index f736d805..2341b9be 100755
--- a/scripts/automation/regression/misc_methods.py
+++ b/scripts/automation/regression/misc_methods.py
@@ -38,7 +38,7 @@ def run_remote_command(host, passwd, command_string):
return_code, stdout, stderr = run_command(cmd)
if return_code == 0:
return (return_code, stdout, stderr)
- else:
+ elif passwd is not None:
print 'Trying connection with expect + sshpass.exp...'
cmd = 'sshpass.exp %s %s root "%s"' % (passwd, host, command_string)
return_code, stdout, stderr = run_command(cmd)
@@ -128,7 +128,7 @@ def load_complete_config_file (filepath):
# Handle T-Rex configuration
trex_config['trex_name'] = config["trex"]["hostname"]
- trex_config['trex_password'] = config["trex"]["password"]
+ trex_config['trex_password'] = config["trex"].get("password")
#trex_config['trex_is_dual'] = config["trex"]["is_dual"]
trex_config['trex_cores'] = int(config["trex"]["cores"])
#trex_config['trex_latency'] = int(config["trex"]["latency"])