From 6bff9bfd8d0a22a13ecd884efd8ba2ba06e33f7c Mon Sep 17 00:00:00 2001 From: Paul Ferrell Date: Mon, 17 Oct 2016 12:36:40 -0600 Subject: [PATCH] Made devel server compatible with python 3.4. --- devel-server.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devel-server.py b/devel-server.py index 410e109..f4ae8d4 100755 --- a/devel-server.py +++ b/devel-server.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import glob +import http import http.server import mistune import os @@ -8,7 +9,13 @@ import pathlib import puzzles import socketserver -HTTPStatus = http.server.HTTPStatus +if hasattr(http, 'HTTPStatus'): + HTTPStatus = http.HTTPStatus +else: + class HTTPStatus: + NOT_FOUND = 404 + OK = 200 + def page(title, body): return """