mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
don't assume ioloop.install is defined (pyzmq < 2.1.7)
This commit is contained in:
parent
d94d6dbffa
commit
8e2758c0ce
@ -32,7 +32,13 @@ import zmq
|
||||
# Install the pyzmq ioloop. This has to be done before anything else from
|
||||
# tornado is imported.
|
||||
from zmq.eventloop import ioloop
|
||||
ioloop.install()
|
||||
# FIXME: ioloop.install is new in pyzmq-2.1.7, so remove this conditional
|
||||
# when pyzmq dependency is updated beyond that.
|
||||
if hasattr(ioloop, 'install'):
|
||||
ioloop.install()
|
||||
else:
|
||||
import tornado.ioloop
|
||||
tornado.ioloop.IOLoop = ioloop.IOLoop
|
||||
|
||||
from tornado import httpserver
|
||||
from tornado import web
|
||||
|
Loading…
Reference in New Issue
Block a user