jw-python/tools
Jan Lindemann d35a5588cd Cmds.__run(): Don't exit(0)
WSGI doesn't like sys.exit() being called, so avoid it. Two cases
need to be taken into consideration:

  1. No exception thrown by self.args.func()

     The variable exit_status is zero, we can check that and _not_
     call sys.exit()

  2. Exception thrown by self.args.func()

     In that case, the exception should be raised, to be caught by
     WSGI / ASGI whatever to do what they want with it. The code
     calling sys.exit() is never reached. Hence, we need to add
     --backtrace to the invocation options.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-07-05 12:27:11 +02:00
..
python Cmds.__run(): Don't exit(0) 2025-07-05 12:27:11 +02:00
Makefile Rename the MODDIR makefile variable to JWBDIR 2019-06-29 23:32:20 +02:00