use gen.Return for Python 2

This commit is contained in:
Min RK 2014-12-16 21:20:09 -08:00
parent dc70ae6b07
commit 41b548bacc

View File

@ -375,7 +375,8 @@ def json_errors(method):
reply = dict(message=message, reason=None, traceback=tb_text)
self.finish(json.dumps(reply))
else:
return result
# FIXME: can use regular return in generators in py3
raise gen.Return(result)
return wrapper