diff options
| author | Joe Gregorio <jcgregorio@google.com> | 2013-03-03 20:29:45 -0500 |
|---|---|---|
| committer | Joe Gregorio <jcgregorio@google.com> | 2013-03-03 20:29:45 -0500 |
| commit | 4eed8a16d8fb223e355f209b70e741c40e94868a (patch) | |
| tree | 30d380b412467b6f94ad2d72d085669bca1507aa /python2/httplib2 | |
| parent | 7f66933e8852c062175d1b4f871206d642e9db72 (diff) | |
| download | httplib2-4eed8a16d8fb223e355f209b70e741c40e94868a.tar.gz | |
Catch an edge case in imports.
Reviewed in https://codereview.appspot.com/7454047/.
Diffstat (limited to 'python2/httplib2')
| -rw-r--r-- | python2/httplib2/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py index 1643cf3..c62afad 100644 --- a/python2/httplib2/__init__.py +++ b/python2/httplib2/__init__.py @@ -1072,7 +1072,7 @@ try: 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 - except ImportError: + except (ImportError, AttributeError): from google3.apphosting.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. @@ -1118,7 +1118,7 @@ try: 'http': AppEngineHttpConnection, 'https': AppEngineHttpsConnection } -except ImportError: +except (ImportError, AttributeError): pass |
