Commit 5fece7fc authored by Martin v. Löwis's avatar Martin v. Löwis

Don't use a file object as system id; try to propagate the file name to

the InputSource.
parent 2aa93efd
......@@ -203,8 +203,10 @@ def prepare_input_source(source, base = ""):
source = xmlreader.InputSource(source)
elif hasattr(source, "read"):
f = source
source = xmlreader.InputSource(source)
source = xmlreader.InputSource()
source.setByteStream(f)
if hasattr(f, "name"):
f.setSystemId(f.name)
if source.getByteStream() is None:
sysid = source.getSystemId()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment