diff options
Diffstat (limited to 'python2/httplib2/__init__.py')
| -rw-r--r-- | python2/httplib2/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py index bbf6f79..334177e 100644 --- a/python2/httplib2/__init__.py +++ b/python2/httplib2/__init__.py @@ -934,6 +934,9 @@ SCHEME_TO_CONNECTION = { # Use a different connection object for Google App Engine try: + from google.appengine.api import apiproxy_stub_map + if apiproxy_stub_map.apiproxy.GetStub('urlfetch') is None: + raise ImportError # Bail out; we're not actually running on App Engine. from google.appengine.api.urlfetch import fetch from google.appengine.api.urlfetch import InvalidURLError from google.appengine.api.urlfetch import DownloadError |
