diff options
Diffstat (limited to 'server.py')
-rwxr-xr-x | server.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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: |