Made devel server compatible with python 3.4.

This commit is contained in:
Paul Ferrell 2016-10-17 12:36:40 -06:00
parent 70458ea33e
commit 6bff9bfd8d
1 changed files with 8 additions and 1 deletions

View File

@ -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 """<!DOCTYPE html>