calibre/src/polyglot/http_server.py
Eli Schwartz 45f68f552b
python3: make coffee build
add polyglot.socketserver wrapper and fix BaseHTTPServer.HTTPServer
2019-03-21 01:27:21 -04:00

14 lines
442 B
Python

#!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
from polyglot.builtins import is_py3
if is_py3:
from http.server import HTTPServer, SimpleHTTPRequestHandler
else:
from BaseHTTPServer import HTTPServer # noqa
from SimpleHTTPServer import SimpleHTTPRequestHandler # noqa