|
|
@ -95,7 +95,7 @@ class RequestHandler(BaseHTTPRequestHandler): |
|
|
|
else: |
|
|
|
else: |
|
|
|
raise HTTPError(404, "Not found") |
|
|
|
raise HTTPError(404, "Not found") |
|
|
|
method_cb(**params) |
|
|
|
method_cb(**params) |
|
|
|
except HTTPError, err: |
|
|
|
except HTTPError as err: |
|
|
|
# HTTP erors are generally thrown by the webapp on purpose. Send |
|
|
|
# HTTP erors are generally thrown by the webapp on purpose. Send |
|
|
|
# error to the browser. |
|
|
|
# error to the browser. |
|
|
|
if err.status_code not in (401, ): |
|
|
|
if err.status_code not in (401, ): |
|
|
@ -108,7 +108,7 @@ class RequestHandler(BaseHTTPRequestHandler): |
|
|
|
err.msg)) |
|
|
|
err.msg)) |
|
|
|
self.wfile.flush() |
|
|
|
self.wfile.flush() |
|
|
|
return False |
|
|
|
return False |
|
|
|
except Exception, err: |
|
|
|
except Exception as err: |
|
|
|
self.scriptform.log.exception(err) |
|
|
|
self.scriptform.log.exception(err) |
|
|
|
self.send_error(500, "Internal server error") |
|
|
|
self.send_error(500, "Internal server error") |
|
|
|
raise |
|
|
|
raise |
|
|
|