From: Ben Darnell Date: Mon, 28 Jan 2013 01:16:58 +0000 (-0500) Subject: Protect the tornado.gen import in testing.py for app engine. X-Git-Tag: v3.0.0~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5db74ae488363a598d389762d9d4c74449741a65;p=thirdparty%2Ftornado.git Protect the tornado.gen import in testing.py for app engine. --- 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