mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
committed by
John R Barker
parent
d5ad3093d6
commit
51b595992b
@@ -35,7 +35,7 @@ def check_for_controlpersist(ssh_executable):
|
||||
|
||||
has_cp = True
|
||||
try:
|
||||
cmd = subprocess.Popen([ssh_executable,'-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
cmd = subprocess.Popen([ssh_executable, '-o', 'ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
if b"Bad configuration option" in err or b"Usage:" in err:
|
||||
has_cp = False
|
||||
@@ -44,4 +44,3 @@ def check_for_controlpersist(ssh_executable):
|
||||
|
||||
_HAS_CONTROLPERSIST[ssh_executable] = has_cp
|
||||
return has_cp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user