[Zope-CVS] CVS: Products/CompositePage - slotexpr.py:1.5

Sidnei da Silva sidnei at awkly.org
Mon May 3 12:03:11 EDT 2004


Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv2612

Modified Files:
	slotexpr.py 
Log Message:
Avoid registering twice. Fix test_suite.


=== Products/CompositePage/slotexpr.py 1.4 => 1.5 ===
--- Products/CompositePage/slotexpr.py:1.4	Fri Mar 12 11:11:30 2004
+++ Products/CompositePage/slotexpr.py	Mon May  3 12:02:40 2004
@@ -82,4 +82,7 @@
 def registerSlotExprType():
     # Register the 'slot:' expression type.
     from Products.PageTemplates.Expressions import getEngine
-    getEngine().registerType("slot", SlotExpr)
+    # Avoid registering twice.
+    engine = getEngine()
+    if not engine.getTypes().has_key('slot'):
+        engine.registerType('slot', SlotExpr)




More information about the Zope-CVS mailing list