aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-11-28 00:13:00 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-11-28 00:13:00 +0100
commit348d0a7a18fd4aa2512418b8be48f5011fbd3f99 (patch)
tree0531a0bbb44387160b5394c9e84355a6c2ede106 /youtube_dl/utils.py
parent03f9daab34605f538294fdffb141ef5d9fc670e6 (diff)
downloadyoutube-dl-348d0a7a18fd4aa2512418b8be48f5011fbd3f99.tar.xz
Py2/3 compatibility for http.client
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index ebff2e8f2..370567705 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -42,6 +42,12 @@ except NameError: # Python 2
import HTMLParser as compat_html_parser
try:
+ import http.client as compat_html_client
+except NameError: # Python 2
+ import httplib as compat_html_client
+
+
+try:
compat_str = unicode # Python 2
except NameError:
compat_str = str