socket.connect needs a tuple

TypeError
https://docs.python.org/2/library/socket.html
RTFD "Note This method has historically accepted a pair of parameters
for AF_INET addresses instead of only a tuple. This was never
intentional and is no longer available in Python 2.0 and later.
"
This commit is contained in:
Jeremy McMillan 2019-01-10 18:00:10 -06:00 committed by Pedro Algarvio
parent 27254fce37
commit 42654d8df9

View File

@ -1893,7 +1893,7 @@ def dns_check(addr, port, safe=False, ipv6=None):
try:
s = socket.socket(h[0], socket.SOCK_STREAM)
s.connect(candidate_addr, port)
s.connect((candidate_addr, port))
s.close()
resolved = candidate_addr