mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
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
This commit is contained in:
+1
-1
@@ -14,6 +14,6 @@ RUN mkdir -p /root/.cheat.sh/log/ \
|
||||
&& python3 lib/fetch.py fetch-all
|
||||
|
||||
# installing server dependencies
|
||||
RUN apk add --update --no-cache py3-jinja2 py3-flask
|
||||
RUN apk add --update --no-cache py3-jinja2 py3-flask bash
|
||||
ENTRYPOINT ["python3"]
|
||||
CMD ["bin/srv.py"]
|
||||
|
||||
@@ -84,7 +84,7 @@ def _render_html(query, result, editable, repository_button, topics_list, reques
|
||||
data = data.encode('utf-8')
|
||||
stdout, stderr = proc.communicate(data)
|
||||
if proc.returncode != 0:
|
||||
error(stdout + stderr)
|
||||
error((stdout + stderr).decode('utf-8'))
|
||||
return stdout.decode('utf-8')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user