mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06: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:
parent
f7d1a10f22
commit
b1fbdbefdb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user