Skip to content

Commit c9a959f

Browse files
committed
Add --debug option to server to log tracebacks on failures
podman build . -t cheat.sh podman run -it --rm -p 8002 cheat.sh bin/srv.py --debug https://stackoverflow.com/questions/26026148/how-to-run-wsgiserver-in-verbose-or-debug-mode
1 parent b2114a4 commit c9a959f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/srv.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def answer(topic=None):
274274
return result
275275
return Response(result, mimetype='text/plain')
276276

277+
278+
if '--debug' in sys.argv:
279+
app.debug = True
277280
if 'CHEATSH_PORT' in os.environ:
278281
PORT = int(os.environ.get('CHEATSH_PORT'))
279282
else:

0 commit comments

Comments
 (0)