Fix Python3 in ansible-connection (#27645)
* Fix Python3 in ansible-connection * Add `errors='surrogate_or_strict'` to `to_bytes()`pull/4420/head
parent
b0efbc5418
commit
a3404418c0
|
@ -250,7 +250,8 @@ class Server():
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
timeout -= 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):
|
def communicate(sock, data):
|
||||||
|
|
Loading…
Reference in New Issue