From 5db74ae488363a598d389762d9d4c74449741a65 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 27 Jan 2013 20:16:58 -0500 Subject: [PATCH] Protect the tornado.gen import in testing.py for app engine. --- tornado/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tornado/testing.py b/tornado/testing.py index c97c802ae..803c35bed 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -21,6 +21,7 @@ information. from __future__ import absolute_import, division, print_function, with_statement try: + from tornado import gen from tornado.httpclient import AsyncHTTPClient from tornado.httpserver import HTTPServer from tornado.simple_httpclient import SimpleAsyncHTTPClient @@ -30,11 +31,11 @@ except ImportError: # These modules are not importable on app engine. Parts of this module # won't work, but e.g. LogTrapTestCase and main() will. AsyncHTTPClient = None + gen = None HTTPServer = None IOLoop = None netutil = None SimpleAsyncHTTPClient = None -from tornado import gen from tornado.log import gen_log from tornado.stack_context import ExceptionStackContext from tornado.util import raise_exc_info, basestring_type -- 2.47.2