[Erp5-report] r30691 - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 17 15:35:34 CET 2009


Author: leonardo
Date: Tue Nov 17 15:35:33 2009
New Revision: 30691

URL: http://svn.erp5.org?rev=30691&view=rev
Log:
Make the IContentish removal logic reusable

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=30691&r1=30690&r2=30691&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Tue Nov 17 15:35:33 2009
@@ -3734,12 +3734,16 @@
   # We're on CMF 1.5 where the IContentish is not yet bridged as a Zope3
   # interface, so no need to worry about events here. Remove this "try:" once
   # we abandon Zope 2.8
-  pass
+  def removeIContentishInterface(cls):
+    pass
 else:
   # suppress CMFCore event machinery from trying to reindex us through events
   # by removing Products.CMFCore.interfaces.IContentish interface.
   # We reindex ourselves in manage_afterAdd thank you very much.
-  classImplementsOnly(Base, implementedBy(Base) - IContentish)
+  def removeIContentishInterface(cls):
+    classImplementsOnly(cls, implementedBy(cls) - IContentish)
+
+removeIContentishInterface(Base)
 
 class TempBase(Base):
   """




More information about the Erp5-report mailing list