mirror of https://github.com/dirtbags/moth.git
Made devel server compatible with python 3.4.
This commit is contained in:
parent
70458ea33e
commit
6bff9bfd8d
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
|
import http
|
||||||
import http.server
|
import http.server
|
||||||
import mistune
|
import mistune
|
||||||
import os
|
import os
|
||||||
|
@ -8,7 +9,13 @@ import pathlib
|
||||||
import puzzles
|
import puzzles
|
||||||
import socketserver
|
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):
|
def page(title, body):
|
||||||
return """<!DOCTYPE html>
|
return """<!DOCTYPE html>
|
||||||
|
|
Loading…
Reference in New Issue