[Erp5-report] r43302 nicolas.dumazet - /erp5/trunk/products/ERP5Type/patches/ObjectManager.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 14 01:57:48 CET 2011


Author: nicolas.dumazet
Date: Mon Feb 14 01:57:48 2011
New Revision: 43302

URL: http://svn.erp5.org?rev=43302&view=rev
Log:
Compatibility between 2.8 and 2.12: allow testing 'some_id in container' also
in 2.8 to avoid failures in 2.8 that pass in 2.12

Modified:
    erp5/trunk/products/ERP5Type/patches/ObjectManager.py

Modified: erp5/trunk/products/ERP5Type/patches/ObjectManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/ObjectManager.py?rev=43302&r1=43301&r2=43302&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/ObjectManager.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/ObjectManager.py [utf8] Mon Feb 14 01:57:48 2011
@@ -46,3 +46,9 @@ def ObjectManager_importObjectFromFile(s
     return ob
 
 ObjectManager._importObjectFromFile=ObjectManager_importObjectFromFile
+
+# BACK: allow using 'some_id in folder' construct in 2.8
+def ObjectManager_contains(self, name):
+  return name in self.objectIds()
+if '__contains__' not in ObjectManager.__dict__:
+  ObjectManager.__contains__ = ObjectManager_contains



More information about the Erp5-report mailing list