mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user