[Zope-dev] bug in trunk ZopePageTemplate.py?
Paul Winkler
pw_lists at slinkp.com
Fri Apr 7 15:37:38 EDT 2006
Running CMF 2.0-beta tests against the zope 2 trunk, I noticed a test failure
that's not happening under zope 2.9:
Error in test testHTML
(Products.CMFDefault.tests.test_Document.DocumentFTPGetTests)
Traceback (most recent call last):
File "/usr/lib/python2.4/unittest.py", line 260, in run
testMethod()
File
"/home/pw/Downloads/Apps/Net/z2-trunk/Products/CMFDefault/tests/test_Document.py",
line 391, in testHTML
ZopePageTemplate('source_html') )
File
"/home/pw/Downloads/Apps/Net/z2-trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py",
line 135, in __init__
self.pt_edit(text, content_type, encoding)
File
"/home/pw/Downloads/Apps/Net/z2-trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py",
line 143, in pt_edit
text = text.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
This is because the semantics of ZopePageTemplate(id, text=None) have changed.
It used to be that if text was None, the contents of www/default.html
would be used. That no longer happends, and pt_edit can't accept None
for the text.
Was this intentional or is it a bug?
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-Dev
mailing list