[Zope3-checkins] CVS: Zope3/src/zope/pagetemplate - pagetemplate.py:1.2.8.2

Godefroid Chapelle gotcha@swing.be
Thu, 13 Mar 2003 12:51:24 -0500


Update of /cvs-repository/Zope3/src/zope/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv23593

Modified Files:
      Tag: template_usage-branch
	pagetemplate.py 
Log Message:
add first template_usage tests



=== Zope3/src/zope/pagetemplate/pagetemplate.py 1.2.8.1 => 1.2.8.2 ===
--- Zope3/src/zope/pagetemplate/pagetemplate.py:1.2.8.1	Tue Feb 25 17:32:19 2003
+++ Zope3/src/zope/pagetemplate/pagetemplate.py	Thu Mar 13 12:50:53 2003
@@ -87,7 +87,12 @@
             text = text.read()
         self.write(text)
 
-    def pt_getContext(self, args=(), options=_default_options, template_usage=u'', **ignored):
+    def pt_getContext(self, args=(), options=_default_options, **ignored):
+        if options.has_key("template_usage"):
+            template_usage = options["template_usage"]
+            del options["template_usage"]
+        else:
+            template_usage = u''
         rval = {'template': self,
                 'options': options,
                 'args': args,