Skip to content

Commit 845ea48

Browse files
committed
getaddrinfo() on Py2 only takes positional args
1 parent fa3abf2 commit 845ea48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/notebookapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def _default_allow_remote(self):
856856
addr = ipaddress.ip_address(self.ip)
857857
except ValueError:
858858
# Address is a hostname
859-
for info in socket.getaddrinfo(self.ip, self.port, type=socket.SOCK_STREAM):
859+
for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM):
860860
addr = ipaddress.ip_address(info[4][0])
861861
if not addr.is_loopback:
862862
return True

0 commit comments

Comments
 (0)