diff mercurial/httpclient/_readers.py @ 29131:8a66eda46c98

httpclient: update to upstream revision 2995635573d2 This is mostly Python 3 compat work thanks to timeless.
author Augie Fackler <augie@google.com>
date Mon, 09 May 2016 21:13:50 -0400
parents 1ad9da968a2e
children 456609cbd840
line wrap: on
line diff
--- a/mercurial/httpclient/_readers.py	Fri May 06 19:52:21 2016 +0800
+++ b/mercurial/httpclient/_readers.py	Mon May 09 21:13:50 2016 -0400
@@ -33,7 +33,12 @@
 """
 from __future__ import absolute_import
 
-import httplib
+try:
+    import httplib
+    httplib.HTTPException
+except ImportError:
+    import http.client as httplib
+
 import logging
 
 logger = logging.getLogger(__name__)