X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fdispatch.py;h=2ece0931513acb4ebcbbfe82efc639dce87ec2ca;hb=b0f95b219e2f9aea9f81d696adbfaaa0e41a6eaf;hp=768d3f43fdf526cc594935678de1d5c74b34233d;hpb=fd7af0a278cf6a58b8ea371e3e84c99c1cb77e0c;p=wrw.git diff --git a/wrw/dispatch.py b/wrw/dispatch.py index 768d3f4..2ece093 100644 --- a/wrw/dispatch.py +++ b/wrw/dispatch.py @@ -19,11 +19,13 @@ def mangle(result): def defaulterror(req, excinfo): from . import resp traceback.print_exception(*excinfo) + sys.stderr.flush() raise resp.httperror(500) def wraphandler(handler, excinfo): def wrapped(req): return handler(req, excinfo) + wrapped.__wrapped__ = handler return wrapped errorhandler = env.var(defaulterror)