Skip to content

Commit 96cc3f6

Browse files
committed
Install bash and fix Python3 subprocess bytes
File "/app/lib/globals.py", line 25, in error if not text.startswith("Too many queries"): TypeError: startswith first arg must be bytes or a tuple of bytes, not str
1 parent dd00fa4 commit 96cc3f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ RUN mkdir -p /root/.cheat.sh/log/ \
1414
&& python3 lib/fetch.py fetch-all
1515

1616
# installing server dependencies
17-
RUN apk add --update --no-cache py3-jinja2 py3-flask
17+
RUN apk add --update --no-cache py3-jinja2 py3-flask bash
1818
ENTRYPOINT ["python3"]
1919
CMD ["bin/srv.py"]

lib/frontend/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _html_wrapper(data):
8484
data = data.encode('utf-8')
8585
stdout, stderr = proc.communicate(data)
8686
if proc.returncode != 0:
87-
error(stdout + stderr)
87+
error((stdout + stderr).decode('utf-8'))
8888
return stdout.decode('utf-8')
8989

9090

0 commit comments

Comments
 (0)