Genshi Default Mode Switch
christopher.schmidt at nokia.com
christopher.schmidt at nokia.com
Mon Jun 14 11:31:19 EST 2010
My previous email hasn't gone through yet, so I can't respond to
it, but I think I've found the solution.
"Lenient error handling was the default in Genshi prior to version 0.5.
Strict mode was introduced in version 0.4, and became the default in 0.5.
The reason for this change was that the lenient error handling was
masking actual errors in templates, thereby also making it harder to
debug some problems."
-- http://genshi.edgewall.org/wiki/Documentation/templates.html
It seems that Venus depends on the lenient handling.
I think the following is a patch that changes venus to use lenient
parsing:
diff --git a/planet/shell/_genshi.py b/planet/shell/_genshi.py
index 5dffab2..fb2a998 100644
--- a/planet/shell/_genshi.py
+++ b/planet/shell/_genshi.py
@@ -68,7 +68,7 @@ def run(script, doc, output_file=None, options={}):
context = Context(**options)
tmpl_fileobj = open(script)
- tmpl = MarkupTemplate(tmpl_fileobj, script)
+ tmpl = MarkupTemplate(tmpl_fileobj, script, lookup="lenient")
tmpl_fileobj.close()
if not output_file:
I've attached this as a file as well.
After making this change, the tests run without failing.
Thanks in advance for any feedback.
Regards,
--
Christopher Schmidt
Nokia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: genshi.patch
Type: application/octet-stream
Size: 475 bytes
Desc: genshi.patch
URL: </archives/devel/attachments/20100614/6c791af5/attachment.obj>
More information about the devel
mailing list