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

Shane Hathaway shane at zope.com
Wed Oct 8 14:05:01 EDT 2003


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

Modified Files:
	composite.py 
Log Message:
restrictedTraverse() chokes on unicode.  Temporarily fixed with str().

=== Products/CompositePage/composite.py 1.3 => 1.4 ===
--- Products/CompositePage/composite.py:1.3	Sat Oct  4 14:10:04 2003
+++ Products/CompositePage/composite.py	Wed Oct  8 14:05:00 2003
@@ -94,7 +94,7 @@
 
     security.declareProtected(perm_names.view, "getTemplate")
     def getTemplate(self):
-        return self.restrictedTraverse(self.template_path)
+        return self.restrictedTraverse(str(self.template_path))
 
     security.declareProtected(perm_names.change_composites, "generateSlots")
     def generateSlots(self):
@@ -118,7 +118,8 @@
             if not self.use_macro:
                 return template()
             else:
-                macro = template.restrictedTraverse(("macros", self.use_macro))
+                macro = template.restrictedTraverse(
+                    ("macros", str(self.use_macro)))
                 return renderMacro(macro, self)
         finally:
             self._v_rendering = 0




More information about the Zope-CVS mailing list