diff --git a/Dockerfile.moth-devel b/Dockerfile.moth-devel index 20c659a..6e8466a 100644 --- a/Dockerfile.moth-devel +++ b/Dockerfile.moth-devel @@ -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" ] diff --git a/devel/devel-server.py b/devel/devel-server.py index 1a6167d..37fda8c 100755 --- a/devel/devel-server.py +++ b/devel/devel-server.py @@ -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):