summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/xml/sax/saxutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py
index 2b0d204..ff9f596 100644
--- a/Lib/xml/sax/saxutils.py
+++ b/Lib/xml/sax/saxutils.py
@@ -10,7 +10,10 @@ from . import xmlreader
try:
_StringTypes = [types.StringType, types.UnicodeType]
except AttributeError:
- _StringTypes = [types.StringType]
+ try:
+ _StringTypes = [types.StringType]
+ except AttributeError:
+ _StringTypes = [str]
# See whether the xmlcharrefreplace error handler is
# supported