Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flush stderr after printing exception in the default error handler.
[wrw.git]
/
wrw
/
dispatch.py
diff --git
a/wrw/dispatch.py
b/wrw/dispatch.py
index
4d22b72
..
f0326cb
100644
(file)
--- a/
wrw/dispatch.py
+++ b/
wrw/dispatch.py
@@
-19,11
+19,13
@@
def mangle(result):
def defaulterror(req, excinfo):
import resp
traceback.print_exception(*excinfo)
def defaulterror(req, excinfo):
import resp
traceback.print_exception(*excinfo)
+ sys.stderr.flush()
raise resp.httperror(500)
def wraphandler(handler, excinfo):
def wrapped(req):
return handler(req, excinfo)
raise resp.httperror(500)
def wraphandler(handler, excinfo):
def wrapped(req):
return handler(req, excinfo)
+ wrapped.__wrapped__ = handler
return wrapped
errorhandler = env.var(defaulterror)
return wrapped
errorhandler = env.var(defaulterror)