Index: third_party/google-endpoints/future/moves/urllib/error.py |
diff --git a/third_party/google-endpoints/future/moves/urllib/error.py b/third_party/google-endpoints/future/moves/urllib/error.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ae49255f08404c8d293f3c4396a05798d701a43c |
--- /dev/null |
+++ b/third_party/google-endpoints/future/moves/urllib/error.py |
@@ -0,0 +1,16 @@ |
+from __future__ import absolute_import |
+from future.standard_library import suspend_hooks |
+ |
+from future.utils import PY3 |
+ |
+if PY3: |
+ from urllib.error import * |
+else: |
+ __future_module__ = True |
+ |
+ # We use this method to get at the original Py2 urllib before any renaming magic |
+ # ContentTooShortError = sys.py2_modules['urllib'].ContentTooShortError |
+ |
+ with suspend_hooks(): |
+ from urllib import ContentTooShortError |
+ from urllib2 import URLError, HTTPError |