Get pre_get to work and make session logs when adapter changes

This commit is contained in:
Matthias Bussonnier 2014-11-01 15:24:06 +01:00
parent 8e1914a446
commit 63d4534959

View File

@ -220,7 +220,9 @@ class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
@gen.coroutine
def get(self, *args, **kwargs):
# pre_get can be a coroutine in subclasses
yield gen.maybe_future(self.pre_get())
# assign and yield in two step to avoid tornado 3 issues
res = self.pre_get()
yield gen.maybe_future(res)
# FIXME: only do super get on tornado ≥ 4
# tornado 3 has no get, will raise 405
if tornado.version_info >= (4,):