From 348d0a7a18fd4aa2512418b8be48f5011fbd3f99 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 28 Nov 2012 00:13:00 +0100 Subject: Py2/3 compatibility for http.client --- youtube_dl/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index ebff2e8..3705677 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 -- cgit v1.1