2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Change to python 2/3 agnostic syntax

This commit is contained in:
Jarrod Johnson 2022-02-02 08:37:22 -05:00
parent 0186f002e0
commit 92dea32dd4

View File

@ -138,7 +138,7 @@ def get_net_apikey(nodename, mgr):
newpass = newpass.encode('utf8')
salt = salt.encode('utf8')
crypted = c_crypt(newpass, salt)
for addrinfo in socket.getaddrinfo(mgr, 13001, type=socket.SOCK_STREAM):
for addrinfo in socket.getaddrinfo(mgr, 13001, 0, socket.SOCK_STREAM):
try:
clisock = socket.socket(addrinfo[0], addrinfo[1])
clisock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)