summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/misc_methods.py
diff options
context:
space:
mode:
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"])