mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
fix py3 string error in ssh failure handling (#42655)
This commit is contained in:
parent
0421305254
commit
5d76b627ef
1 changed files with 5 additions and 5 deletions
|
@ -297,10 +297,10 @@ except ImportError:
|
||||||
display = Display()
|
display = Display()
|
||||||
|
|
||||||
|
|
||||||
NOT_SSH_ERRORS = ('Traceback (most recent call last):', # Python-2.6 when there's an exception
|
b_NOT_SSH_ERRORS = (b'Traceback (most recent call last):', # Python-2.6 when there's an exception
|
||||||
# while invoking a script via -m
|
# while invoking a script via -m
|
||||||
'PHP Parse error:', # Php always returns error 255
|
b'PHP Parse error:', # Php always returns error 255
|
||||||
)
|
)
|
||||||
|
|
||||||
SSHPASS_AVAILABLE = None
|
SSHPASS_AVAILABLE = None
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ def _ssh_retry(func):
|
||||||
|
|
||||||
if return_tuple[0] == 255:
|
if return_tuple[0] == 255:
|
||||||
SSH_ERROR = True
|
SSH_ERROR = True
|
||||||
for signature in NOT_SSH_ERRORS:
|
for signature in b_NOT_SSH_ERRORS:
|
||||||
if signature in return_tuple[1]:
|
if signature in return_tuple[1]:
|
||||||
SSH_ERROR = False
|
SSH_ERROR = False
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue