[Zope-CVS] CVS: Products/CompositePage - composite.py:1.8

Shane Hathaway shane at zope.com
Thu Dec 11 10:56:07 EST 2003


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

Modified Files:
	composite.py 
Log Message:
Now raises an error when no template has been chosen


=== Products/CompositePage/composite.py 1.7 => 1.8 ===
--- Products/CompositePage/composite.py:1.7	Wed Nov  5 15:04:50 2003
+++ Products/CompositePage/composite.py	Thu Dec 11 10:56:07 2003
@@ -102,6 +102,8 @@
 
     security.declareProtected(perm_names.view, "getTemplate")
     def getTemplate(self):
+        if not self.template_path:
+            raise CompositeError("No template set")
         return self.restrictedTraverse(str(self.template_path))
 
     security.declareProtected(perm_names.change_composites, "generateSlots")




More information about the Zope-CVS mailing list