diff options
| author | Olivier Dony <odo@openerp.com> | 2015-01-29 13:50:35 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-01-29 13:50:51 +0100 |
| commit | c9b690f6b67cbcd382368097d206e07f080d892e (patch) | |
| tree | 75b4b9769de18761eaed3c7c0bdd1279522de55e /openerp/tools | |
| parent | a4c3670f662eb6ac07ed0ade144ac5648480cf8c (diff) | |
| parent | 4c2706d6858c4b7ec6db4b647dc2e3559f650cd8 (diff) | |
[MERGE] Forward-port latest 7.0 bugfixes, up to 4c2706d6858c4b7ec6db4b647dc2e3559f650cd8
Diffstat (limited to 'openerp/tools')
| -rw-r--r-- | openerp/tools/safe_eval.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openerp/tools/safe_eval.py b/openerp/tools/safe_eval.py index a274de8468a..0094881e325 100644 --- a/openerp/tools/safe_eval.py +++ b/openerp/tools/safe_eval.py @@ -32,6 +32,7 @@ condition/math builtins. # - safe_eval in tryton http://hg.tryton.org/hgwebdir.cgi/trytond/rev/bbb5f73319ad from opcode import HAVE_ARGUMENT, opmap, opname +from psycopg2 import OperationalError from types import CodeType import logging @@ -321,6 +322,10 @@ def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=Fal raise except openerp.exceptions.AccessError: raise + except OperationalError: + # Do not hide PostgreSQL low-level exceptions, to let the auto-replay + # of serialized transactions work its magic + raise except Exception, e: import sys exc_info = sys.exc_info() |
