mirror of https://github.com/dirtbags/moth.git
Fixing some Python 3.5 vs 3.7 compatibility issues
This commit is contained in:
parent
96835d6504
commit
e330990211
|
@ -16,6 +16,5 @@ COPY devel /app/
|
|||
COPY example-puzzles /puzzles/
|
||||
COPY theme /theme/
|
||||
|
||||
WORKDIR /moth/
|
||||
ENTRYPOINT [ "python3", "/app/devel-server.py" ]
|
||||
CMD [ "--bind", "0.0.0.0:8080", "--puzzles", "/puzzles", "--theme", "/theme" ]
|
||||
|
|
|
@ -43,7 +43,11 @@ class MothRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|||
|
||||
def __init__(self, request, client_address, server):
|
||||
self.directory = str(server.args["theme_dir"])
|
||||
super().__init__(request, client_address, server)
|
||||
try:
|
||||
super().__init__(request, client_address, server, directory=server.args["theme_dir"])
|
||||
except TypeError:
|
||||
super().__init__(request, client_address, server)
|
||||
|
||||
|
||||
# Backport from Python 3.7
|
||||
def translate_path(self, path):
|
||||
|
|
Loading…
Reference in New Issue