Log message for revision 68415:
  Merged r68414 from 2.10 branch:
  There must be no warning when __name__ is supplied.
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py    
2006-05-31 17:59:21 UTC (rev 68414)
+++ Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py    
2006-05-31 18:00:30 UTC (rev 68415)
@@ -59,15 +59,13 @@
     _default_bindings = {'name_subpath': 'traverse_subpath'}
 
     def __init__(self, filename, _prefix=None, **kw):
-        name = None
-        if kw.has_key('__name__'):
-            name = kw['__name__']
-            del kw['__name__'] 
+        name = kw.pop('__name__', None)
 
         basepath, ext = os.path.splitext(filename)
 
         if name:
             self.id = self.__name__ = name
+            self._need__name__ = 0
         else:
             self.id = self.__name__ = os.path.basename(basepath)
 

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to