[FIX] tests dont log traceback on aborted request while testing
bzr revid: al@openerp.com-20140317135239-08aefkdxiil7bpcs
This commit is contained in:
parent
cd4f83122a
commit
627b5b671e
|
@ -361,7 +361,7 @@ class JsonRequest(WebRequest):
|
|||
response['id'] = self.jsonrequest.get('id')
|
||||
response["result"] = self._call_function(**self.params)
|
||||
except AuthenticationError, e:
|
||||
_logger.exception("Exception during JSON request handling.")
|
||||
_logger.exception("JSON-RPC AuthenticationError in %s.", self.httprequest.path)
|
||||
se = serialize_exception(e)
|
||||
error = {
|
||||
'code': 100,
|
||||
|
@ -369,7 +369,9 @@ class JsonRequest(WebRequest):
|
|||
'data': se
|
||||
}
|
||||
except Exception, e:
|
||||
_logger.exception("Exception during JSON request handling.")
|
||||
# Mute test cursor error for runbot
|
||||
if not (openerp.tools.config['test_enable'] and isinstance(e, psycopg2.OperationalError)):
|
||||
_logger.exception("JSON-RPC Exception in %s.", self.httprequest.path)
|
||||
se = serialize_exception(e)
|
||||
error = {
|
||||
'code': 200,
|
||||
|
|
|
@ -47,8 +47,6 @@ def acquire_test_cursor(session_id):
|
|||
cr = HTTP_SESSION.get(session_id)
|
||||
if cr:
|
||||
cr._test_lock.acquire()
|
||||
if cr._closed:
|
||||
werkzeug.exceptions.abort(500)
|
||||
return cr
|
||||
|
||||
def release_test_cursor(cr):
|
||||
|
|
Loading…
Reference in New Issue