Commit 6c3e8f21 by James Cammarata

Port of d412bc72 to stable-1.9

parent 742c6a1f
...@@ -230,9 +230,12 @@ class Runner(object): ...@@ -230,9 +230,12 @@ class Runner(object):
self.transport = "paramiko" self.transport = "paramiko"
else: else:
# see if SSH can support ControlPersist if not use paramiko # see if SSH can support ControlPersist if not use paramiko
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) try:
(out, err) = cmd.communicate() cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if "Bad configuration option" in err: (out, err) = cmd.communicate()
if "Bad configuration option" in err:
self.transport = "paramiko"
except OSError:
self.transport = "paramiko" self.transport = "paramiko"
# save the original transport, in case it gets # save the original transport, in case it gets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment