[Erp5-report] r26949 - in /erp5/trunk/products/ERP5Type: ZopePatch.py patches/TM.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 13 11:42:31 CEST 2009
Author: jm
Date: Wed May 13 11:42:27 2009
New Revision: 26949
URL: http://svn.erp5.org?rev=26949&view=rev
Log:
Fix bug in Shared.DC.ZRDB.TM that may hide a critical error.
Added:
erp5/trunk/products/ERP5Type/patches/TM.py (with props)
Modified:
erp5/trunk/products/ERP5Type/ZopePatch.py
Modified: erp5/trunk/products/ERP5Type/ZopePatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ZopePatch.py?rev=26949&r1=26948&r2=26949&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ZopePatch.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ZopePatch.py [utf8] Wed May 13 11:42:27 2009
@@ -22,6 +22,7 @@
# Load all monkey patches
from Products.ERP5Type.patches import ObjectManager
from Products.ERP5Type.patches import PropertyManager
+from Products.ERP5Type.patches import TM
from Products.ERP5Type.patches import DA
from Products.ERP5Type.patches import DCWorkflow
from Products.ERP5Type.patches import BTreeFolder2
Added: erp5/trunk/products/ERP5Type/patches/TM.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/TM.py?rev=26949&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/TM.py (added)
+++ erp5/trunk/products/ERP5Type/patches/TM.py [utf8] Wed May 13 11:42:27 2009
@@ -1,0 +1,31 @@
+##############################################################################
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##############################################################################
+
+import transaction
+from Shared.DC.ZRDB.TM import TM, Surrogate
+
+
+# ZPublisher error path can aggravate error:
+# https://bugs.launchpad.net/bugs/229863
+
+def TM__register(self):
+ if not self._registered:
+ #try:
+ transaction.get().register(Surrogate(self))
+ self._begin()
+ self._registered = 1
+ self._finalize = 0
+ #except: pass
+
+TM._register = TM__register
Propchange: erp5/trunk/products/ERP5Type/patches/TM.py
------------------------------------------------------------------------------
svn:eol-style = native
More information about the Erp5-report
mailing list