[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.12

Evan Simpson evan@zope.com
Wed, 27 Feb 2002 14:14:12 -0500


Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv31839

Modified Files:
	PageTemplateFile.py 
Log Message:
Provide __name__ for constructors.


=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.11 => 1.12 ===
             self._need__name__ = 0
             self.__name__ = name
+        else:
+            self.__name__ = os.path.splitext(os.path.split(filename)[-1])[0]
         if not os.path.splitext(filename)[1]:
             filename = filename + '.zpt'
         self.filename = os.path.join(_prefix, filename)