mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-08 20:18:07 -05:00
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 <slaznick@redhat.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user