Fix Python3 in ansible-connection (#27645)

* Fix Python3 in ansible-connection

* Add `errors='surrogate_or_strict'` to `to_bytes()`
pull/17533/merge
Nathaniel Case 7 years ago committed by GitHub
parent b0efbc5418
commit a3404418c0

@ -250,7 +250,8 @@ class Server():
break
time.sleep(1)
timeout -= 1
return 0, b'\n#SOCKET_PATH#: %s\n' % self.socket_path, ''
socket_bytes = to_bytes(self.socket_path, errors='surrogate_or_strict')
return 0, b'\n#SOCKET_PATH#: %s\n' % socket_bytes, ''
def communicate(sock, data):

Loading…
Cancel
Save