Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't feed empty strings in getXMLSerializer, with some versions of l…

…ibxml2 this seems to cause problems.
  • Loading branch information...
commit c7fc53ce7a493c1b21bb4180adfb065a2fe75073 1 parent f555d86
@lrowe authored
Showing with 6 additions and 1 deletion.
  1. +4 −0 CHANGES.txt
  2. +2 −1  repoze/xmliter/utils.py
View
4 CHANGES.txt
@@ -4,6 +4,10 @@ Changelog
0.2 - unreleased
----------------
+* Don't feed empty strings in getXMLSerializer, with some versions of libxml2
+ this seems to cause problems.
+ [Laurence]
+
* Defer to xsl:output settings when serializing an XSLResultTree.
[Laurence]
View
3  repoze/xmliter/utils.py
@@ -12,7 +12,8 @@ def getXMLSerializer(iterable, parser=etree.XMLParser, serializer=etree.tostring
p = parser(encoding=encoding)
for chunk in iterable:
- p.feed(chunk)
+ if chunk:
+ p.feed(chunk)
root = p.close()
return XMLSerializer(root.getroottree(), serializer, pretty_print)
Please sign in to comment.
Something went wrong with that request. Please try again.