python/retrace: Trim null chars.

They are often left in memory mapped files, and are not part of the XML
accept chars anyway.
This commit is contained in:
José Fonseca
2008-08-19 18:25:38 +01:00
parent 200d6dcc83
commit 5f1ef11ad2

View File

@@ -101,6 +101,7 @@ class XmlTokenizer:
self.index = 0
data = self.fp.read(size)
self.final = len(data) < size
data = data.rstrip('\0')
try:
self.parser.Parse(data, self.final)
except xml.parsers.expat.ExpatError, e: