Port of d412bc7
to stable-1.9
This commit is contained in:
parent
742c6a1ffb
commit
6c3e8f214a
1 changed files with 6 additions and 3 deletions
|
@ -230,10 +230,13 @@ 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
|
||||||
|
try:
|
||||||
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
(out, err) = cmd.communicate()
|
(out, err) = cmd.communicate()
|
||||||
if "Bad configuration option" in err:
|
if "Bad configuration option" in err:
|
||||||
self.transport = "paramiko"
|
self.transport = "paramiko"
|
||||||
|
except OSError:
|
||||||
|
self.transport = "paramiko"
|
||||||
|
|
||||||
# save the original transport, in case it gets
|
# save the original transport, in case it gets
|
||||||
# changed later via options like accelerate
|
# changed later via options like accelerate
|
||||||
|
|
Loading…
Reference in a new issue