diff options
Diffstat (limited to 'Lib/xml/sax/saxutils.py')
-rw-r--r-- | Lib/xml/sax/saxutils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 74de9b0..1d3d0ec 100644 --- a/Lib/xml/sax/saxutils.py +++ b/Lib/xml/sax/saxutils.py @@ -346,7 +346,7 @@ def prepare_input_source(source, base=""): f = source source = xmlreader.InputSource() source.setByteStream(f) - if hasattr(f, "name"): + if hasattr(f, "name") and isinstance(f.name, str): source.setSystemId(f.name) if source.getByteStream() is None: |