##// END OF EJS Templates
addressing @minrk's PR feedback...
Paul Ivanov -
Show More
@@ -40,6 +40,7 b' from jinja2 import Environment, FileSystemLoader'
40 from zmq.eventloop import ioloop
40 from zmq.eventloop import ioloop
41 ioloop.install()
41 ioloop.install()
42
42
43 import tornado
43 from tornado import httpserver
44 from tornado import httpserver
44 from tornado import web
45 from tornado import web
45
46
@@ -524,7 +525,7 b' class NotebookApp(BaseIPythonApplication):'
524 except socket.error as e:
525 except socket.error as e:
525 # XXX: remove the e.errno == -9 block when we require
526 # XXX: remove the e.errno == -9 block when we require
526 # tornado >= 3.0
527 # tornado >= 3.0
527 if e.errno == -9:
528 if e.errno == -9 and tornado.version_info[0] < 3:
528 # The flags passed to socket.getaddrinfo from
529 # The flags passed to socket.getaddrinfo from
529 # tornado.netutils.bind_sockets can cause "gaierror:
530 # tornado.netutils.bind_sockets can cause "gaierror:
530 # [Errno -9] Address family for hostname not supported"
531 # [Errno -9] Address family for hostname not supported"
@@ -533,7 +534,7 b' class NotebookApp(BaseIPythonApplication):'
533 # not cause this error, but the only way to do this is to
534 # not cause this error, but the only way to do this is to
534 # monkeypatch socket to remove the AI_ADDRCONFIG attribute
535 # monkeypatch socket to remove the AI_ADDRCONFIG attribute
535 saved_AI_ADDRCONFIG = socket.AI_ADDRCONFIG
536 saved_AI_ADDRCONFIG = socket.AI_ADDRCONFIG
536 self.log.info('Monkeypatching socket to fix tornado bug')
537 self.log.warn('Monkeypatching socket to fix tornado bug')
537 del(socket.AI_ADDRCONFIG)
538 del(socket.AI_ADDRCONFIG)
538 try:
539 try:
539 # retry the tornado call without AI_ADDRCONFIG flags
540 # retry the tornado call without AI_ADDRCONFIG flags
General Comments 0
You need to be logged in to leave comments. Login now