aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rwxr-xr-xserver.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.py b/server.py
index 6052b06..1b64766 100755
--- a/server.py
+++ b/server.py
@@ -54,7 +54,10 @@ def main(args=None):
os.chdir(script_dir())
args = parse_args(args)
addr = ('', args.port)
- httpd = http.server.ThreadingHTTPServer(addr, RequestHandler)
+ server = http.server.HTTPServer
+ if sys.version_info >= (3, 7):
+ server = http.server.ThreadingHTTPServer
+ httpd = server(addr, RequestHandler)
try:
httpd.serve_forever()
except KeyboardInterrupt: