1
1
mirror of https://github.com/eblot/pybootd.git synced 2024-09-11 22:17:44 +03:00

Do not use ThreadingHTTPServer which has only been introduced w/ Py3.7

This commit is contained in:
Emmanuel Blot 2020-04-12 18:11:19 +02:00
parent 0eacc7899b
commit b96e352c34

View File

@ -1,4 +1,4 @@
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr> # Copyright (c) 2010-2020 Emmanuel Blot <emmanuel.blot@free.fr>
# Copyright (c) 2010-2011 Neotion # Copyright (c) 2010-2011 Neotion
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
@ -19,7 +19,7 @@
from argparse import ArgumentParser, FileType from argparse import ArgumentParser, FileType
from functools import partial from functools import partial
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer from http.server import SimpleHTTPRequestHandler, HTTPServer
from os import getcwd from os import getcwd
from os.path import isfile, join as joinpath, realpath from os.path import isfile, join as joinpath, realpath
from sys import exit as sysexit, modules, stderr from sys import exit as sysexit, modules, stderr
@ -73,7 +73,7 @@ class HttpRequestHandler(SimpleHTTPRequestHandler):
return False return False
return True return True
class HttpServer(ThreadingHTTPServer): class HttpServer(HTTPServer):
HTTP_SECTION = 'httpd' HTTP_SECTION = 'httpd'