From 5d76b627efbe3e4274d7c2082abfe6ee1bde8536 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 13 Jul 2018 14:36:46 -0700 Subject: [PATCH] fix py3 string error in ssh failure handling (#42655) --- lib/ansible/plugins/connection/ssh.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 9e0fd342703..e0056c71f14 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -297,10 +297,10 @@ except ImportError: display = Display() -NOT_SSH_ERRORS = ('Traceback (most recent call last):', # Python-2.6 when there's an exception - # while invoking a script via -m - 'PHP Parse error:', # Php always returns error 255 - ) +b_NOT_SSH_ERRORS = (b'Traceback (most recent call last):', # Python-2.6 when there's an exception + # while invoking a script via -m + b'PHP Parse error:', # Php always returns error 255 + ) SSHPASS_AVAILABLE = None @@ -351,7 +351,7 @@ def _ssh_retry(func): if return_tuple[0] == 255: SSH_ERROR = True - for signature in NOT_SSH_ERRORS: + for signature in b_NOT_SSH_ERRORS: if signature in return_tuple[1]: SSH_ERROR = False break