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

Godefroid Chapelle gotcha@swing.be
Fri, 14 Mar 2003 10:45:56 -0500


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

Modified Files:
      Tag: template_usage-branch
	pagetemplate.py 
Log Message:
service view now usage aware



=== Zope3/src/zope/pagetemplate/pagetemplate.py 1.2.8.3 => 1.2.8.4 ===
--- Zope3/src/zope/pagetemplate/pagetemplate.py:1.2.8.3	Fri Mar 14 06:00:13 2003
+++ Zope3/src/zope/pagetemplate/pagetemplate.py	Fri Mar 14 10:45:55 2003
@@ -88,16 +88,11 @@
         self.write(text)
 
     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,
                 'nothing': None,
-                'usage': TemplateUsage(template_usage),
+                'usage': TemplateUsage(options.get("template_usage", u'')),
                 }
         rval.update(self.pt_getEngine().getBaseNames())
         return rval