Commit 7445dfb5 authored by Florent Guillaume's avatar Florent Guillaume

Merged r68414 from 2.10 branch:

There must be no warning when __name__ is supplied.
parent fbe0d58a
......@@ -59,15 +59,13 @@ class PageTemplateFile(SimpleItem, Script, PageTemplate, Traversable):
_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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment