diff options
author | Nathaniel Case <this.is@nathanielca.se> | 2017-08-02 14:10:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 14:10:05 -0400 |
commit | a3404418c04a1272e5c0d08966a27b99dd304626 (patch) | |
tree | 2c253c52fe690aa18066c7f4ae518ff16a0201c1 /bin | |
parent | b0efbc541882c55b6503fbf51909eb7dd3f20f1a (diff) | |
download | ansible-a3404418c04a1272e5c0d08966a27b99dd304626.tar.gz |
Fix Python3 in ansible-connection (#27645)
* Fix Python3 in ansible-connection
* Add `errors='surrogate_or_strict'` to `to_bytes()`
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ansible-connection | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection index 84fdc06fb0..a3e3c7cf41 100755 --- a/bin/ansible-connection +++ b/bin/ansible-connection @@ -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): |