Py2/3 compatibility for http.client
This commit is contained in:
parent
03f9daab34
commit
348d0a7a18
3 changed files with 63 additions and 59 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue