Update version check to work with tornado 2.1.0 or 2.1.1

This commit is contained in:
Fernando Perez 2011-10-30 13:12:12 -07:00
parent e1a2eae156
commit 6e19364cfd

View File

@ -35,7 +35,7 @@ except ImportError:
publish_string = None
#-----------------------------------------------------------------------------
# Monkeypatch for Tornado 2.1.1 - Remove when no longer necessary!
# Monkeypatch for Tornado <= 2.1.1 - Remove when no longer necessary!
#-----------------------------------------------------------------------------
# Google Chrome, as of release 16, changed its websocket protocol number. The
@ -56,7 +56,7 @@ except ImportError:
import tornado
if tornado.version == '2.1.1':
if tornado.version_info <= (2,1,1):
def _execute(self, transforms, *args, **kwargs):
from tornado.websocket import WebSocketProtocol8, WebSocketProtocol76