[issue22915] sax.parser cannot get xml data from a subprocess pipe

Jocelyn report at bugs.python.org
Sat Nov 22 23:52:20 CET 2014


Jocelyn added the comment:

Here is a patch to add a test to test_sax.py.

I'm not sure on the fix. Is the following one a correct one ?

     def prepareParser(self, source):
         if source.getSystemId() is not None:
-            self._parser.SetBase(source.getSystemId())
+            self._parser.SetBase(str(source.getSystemId()))


Or should I remove the call to SetBase if getSystemId() is not a string ?

----------
keywords: +patch
Added file: http://bugs.python.org/file37249/test-22915.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22915>
_______________________________________


More information about the Python-bugs-list mailing list