except ImportError:
compat_subprocess_get_DEVNULL = lambda: open(os.path.devnull, 'w')
+try:
+ import http.server as compat_http_server
+except ImportError:
+ import BaseHTTPServer as compat_http_server
+
try:
from urllib.parse import unquote as compat_urllib_parse_unquote
except ImportError:
if err is not None:
raise err
else:
- raise error("getaddrinfo returns an empty list")
+ raise socket.error("getaddrinfo returns an empty list")
else:
compat_socket_create_connection = socket.create_connection
'compat_html_entities',
'compat_html_parser',
'compat_http_client',
+ 'compat_http_server',
'compat_kwargs',
'compat_ord',
'compat_parse_qs',
'compat_print',
- 'compat_str',
'compat_socket_create_connection',
+ 'compat_str',
'compat_subprocess_get_DEVNULL',
'compat_urllib_error',
'compat_urllib_parse',