From: Fredrik Tolf Date: Sun, 5 Jan 2014 08:10:36 +0000 (+0100) Subject: Merge branch 'master' into python3 X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=commitdiff_plain;h=b0f95b219e2f9aea9f81d696adbfaaa0e41a6eaf;hp=-c Merge branch 'master' into python3 --- b0f95b219e2f9aea9f81d696adbfaaa0e41a6eaf diff --combined wrw/dispatch.py index 5276892,f0326cb..2ece093 --- a/wrw/dispatch.py +++ b/wrw/dispatch.py @@@ -1,5 -1,5 +1,5 @@@ import sys, traceback -import env, req, proto +from . import env, req, proto __all__ = ["restart"] @@@ -17,8 -17,9 +17,9 @@@ def mangle(result) return [str(result)] def defaulterror(req, excinfo): - import resp + from . import resp traceback.print_exception(*excinfo) + sys.stderr.flush() raise resp.httperror(500) def wraphandler(handler, excinfo): @@@ -37,9 -38,9 +38,9 @@@ def handle(req, startreq, handler) try: resp = handler(req) break - except restart, i: + except restart as i: handler = i.handle - except Exception, i: + except Exception as i: if eh is None: raise handler = wraphandler(eh, sys.exc_info())