summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax/saxutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xml/sax/saxutils.py')
-rw-r--r--Lib/xml/sax/saxutils.py2
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: