diff --git a/lib/ansible/plugins/connection/persistent.py b/lib/ansible/plugins/connection/persistent.py index 54177e95ba..9cad2d5604 100644 --- a/lib/ansible/plugins/connection/persistent.py +++ b/lib/ansible/plugins/connection/persistent.py @@ -92,7 +92,7 @@ class Connection(ConnectionBase): """ socket_path = None rc, out, err = self._do_it('RUN:') - match = re.search(r"#SOCKET_PATH#: (\S+)", out) + match = re.search(br"#SOCKET_PATH#: (\S+)", out) if match: socket_path = to_text(match.group(1).strip(), errors='surrogate_or_strict')