From 8e2758c0ceaa26bf3d342e24edd24b6d4c35df40 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 22 Nov 2011 19:50:19 -0800 Subject: [PATCH] don't assume ioloop.install is defined (pyzmq < 2.1.7) --- IPython/frontend/html/notebook/notebookapp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 24f018888..1d1795984 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -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