1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix Python3 in ansible-connection (#27645)

* Fix Python3 in ansible-connection

* Add `errors='surrogate_or_strict'` to `to_bytes()`
This commit is contained in:
Nathaniel Case 2017-08-02 14:10:05 -04:00 committed by GitHub
parent b0efbc5418
commit a3404418c0

View file

@ -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):