From b1fbdbefdb201fc036e41e84a25e3e0725d8e3d2 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Thu, 17 Aug 2017 14:59:08 +0200 Subject: ipautil: port host_port_open() to python 3 socket.send() expects `Bytes` instance, not string https://pagure.io/freeipa/issue/4985 Reviewed-By: Stanislav Laznicka --- ipapython/ipautil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython') diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 1786996ec..c5c5e9e21 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -983,7 +983,7 @@ def host_port_open(host, port, socket_type=socket.SOCK_STREAM, s.connect(sa) if socket_type == socket.SOCK_DGRAM: - s.send('') + s.send(b'') s.recv(512) except socket.error: port_open = False -- cgit