From 2959fa0a9f69cbfb7611bbc12488089921d26ab8 2012-02-22 01:55:04 From: Matthew Brett Date: 2012-02-22 01:55:04 Subject: [PATCH] Fix for tornado check for tornado < 1.1.0 Tornado < 1.1.0 does not have the ``version_info`` variable to check. Debian squeeze has tornado 1.0.1. --- diff --git a/IPython/frontend/html/notebook/__init__.py b/IPython/frontend/html/notebook/__init__.py index 35954cc..c99e4a8 100644 --- a/IPython/frontend/html/notebook/__init__.py +++ b/IPython/frontend/html/notebook/__init__.py @@ -6,7 +6,10 @@ try: import tornado except ImportError: raise ImportError(msg) -else: - if tornado.version_info < (2,1,0): - raise ImportError(msg+", but you have %s"%tornado.version) +try: + version_info = tornado.version_info +except AttributeError: + raise ImportError(msg + ", but you have < 1.1.0") +if version_info < (2,1,0): + raise ImportError(msg + ", but you have %s" % tornado.version) del msg