Py2/3 compatibility for http.client

This commit is contained in:
Philipp Hagemeister 2012-11-28 00:13:00 +01:00
parent 03f9daab34
commit 348d0a7a18
3 changed files with 63 additions and 59 deletions

View file

@ -41,6 +41,12 @@ try:
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: