diff options
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r-- | Lib/xml/sax/saxutils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 892f34d..9fe8a4a 100644 --- a/Lib/xml/sax/saxutils.py +++ b/Lib/xml/sax/saxutils.py @@ -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() |