aboutsummaryrefslogtreecommitdiff
path: root/rumba/ssh_support.py
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-06-01 17:34:53 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-06-01 17:34:53 +0200
commitc92408dc0a74e2ca1ef47cc721ad41dff614aaa4 (patch)
tree067acf362c8a52486e95e8e08ec13e1dcdb82c01 /rumba/ssh_support.py
parent30dbd8b5493480d2c302380735083c2d9b8f8260 (diff)
downloadrumba-c92408dc0a74e2ca1ef47cc721ad41dff614aaa4.tar.gz
rumba-c92408dc0a74e2ca1ef47cc721ad41dff614aaa4.zip
Model: corrected no-proxy case. rlite: removed hardcoded proxy
Diffstat (limited to 'rumba/ssh_support.py')
-rw-r--r--rumba/ssh_support.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/rumba/ssh_support.py b/rumba/ssh_support.py
index 93a48f8..f8ba03b 100644
--- a/rumba/ssh_support.py
+++ b/rumba/ssh_support.py
@@ -59,9 +59,12 @@ def execute_proxy_commands(testbed, ssh_config, commands, time_out=3):
new_commands = []
for command in commands:
proxy = testbed.http_proxy
- proxy_command = 'export http_proxy=' + proxy + '; ' \
- + 'export https_proxy=' + proxy + ';'
- new_commands.append(proxy_command + ' ' + command)
+ if proxy is not None:
+ proxy_command = 'export http_proxy=' + proxy + '; ' \
+ + 'export https_proxy=' + proxy + ';'
+ new_commands.append(proxy_command + ' ' + command)
+ else:
+ new_commands.append(command)
return execute_commands(testbed, ssh_config, new_commands, time_out)