aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/server.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-11 10:58:45 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-11 10:58:45 +0200
commit95eeffdd8cc3443add1ce2c739d0c413ac502015 (patch)
tree459586723a4ae7ce5b16abf57f28b73a39cfc3b9 /src/server.py
parentREADME: update (diff)
downloadlinux-status-95eeffdd8cc3443add1ce2c739d0c413ac502015.tar.gz
linux-status-95eeffdd8cc3443add1ce2c739d0c413ac502015.zip
src: shorter import
Diffstat (limited to 'src/server.py')
-rwxr-xr-xsrc/server.py3
1 files changed, 2 insertions, 1 deletions
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