From: Cecile Tonglet Date: Wed, 13 Feb 2013 13:32:57 +0000 (+0100) Subject: [FIX] osv: Bad error message X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=0c5a8c85811678a4d0f3dcc6be7b4220ed47ff21;p=odoo%2Fodoo.git [FIX] osv: Bad error message bzr revid: cto@openerp.com-20130213133257-8uvc5vtp5tl4834l --- diff --git a/openerp/osv/osv.py b/openerp/osv/osv.py index e4b29d9..3f0c723 100644 --- a/openerp/osv/osv.py +++ b/openerp/osv/osv.py @@ -129,7 +129,9 @@ class object_proxy(object): return f(self, dbname, *args, **kwargs) except OperationalError, e: # Automatically retry the typical transaction serialization errors - if not e.pgcode in PG_CONCURRENCY_ERRORS_TO_RETRY or tries >= MAX_TRIES_ON_CONCURRENCY_FAILURE: + if e.pgcode not in PG_CONCURRENCY_ERRORS_TO_RETRY: + raise + if tries >= MAX_TRIES_ON_CONCURRENCY_FAILURE: self.logger.warning("%s, maximum number of tries reached" % errorcodes.lookup(e.pgcode)) raise wait_time = random.uniform(0.0, 2 ** tries)