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:
parent
b0efbc5418
commit
a3404418c0
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue