diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/app.py | 3 | ||||
-rwxr-xr-x | src/server.py | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -44,6 +44,7 @@ import cgi from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from enum import Enum +from http import HTTPStatus import http.server import json import os @@ -66,7 +67,7 @@ def split_by(xs, sep): class Response: - DEFAULT_STATUS = http.server.HTTPStatus.OK + DEFAULT_STATUS = HTTPStatus.OK @staticmethod def body_from_json(body): diff --git a/src/server.py b/src/server.py index 75723bd..9ffe6f1 100755 --- a/src/server.py +++ b/src/server.py @@ -9,6 +9,7 @@ # custom URLs. See that file for the reasons behind this. import argparse +from http import HTTPStatus import http.server import os import sys @@ -38,7 +39,7 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler): response = request.process() response.write_to_request_handler(self) except: - status = http.server.HTTPStatus.INTERNAL_SERVER_ERROR + status = HTTPStatus.INTERNAL_SERVER_ERROR response = Response(traceback.format_exc(), status) response.write_to_request_handler(self) return |