summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-07-27 17:26:00 (GMT)
committerGuido van Rossum <guido@python.org>2007-07-27 17:26:00 (GMT)
commit3992db81b6c4050a26f7e242b1f16fee245b3127 (patch)
tree2d39e78f674e92aa868c2adf8e3dd54dbf13bbb8 /Lib
parent624ab7c28ab8a57f922f47b19b1a5cce7bc26dd2 (diff)
downloadcpython-3992db81b6c4050a26f7e242b1f16fee245b3127.zip
cpython-3992db81b6c4050a26f7e242b1f16fee245b3127.tar.gz
cpython-3992db81b6c4050a26f7e242b1f16fee245b3127.tar.bz2
SF patch# 1759922 by Alexandre Vassalotti.
Fix one of the two failing tests for minidom.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/xml/dom/pulldom.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index fe9a3a2..c1463c91 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -2,11 +2,6 @@ import xml.sax
import xml.sax.handler
import types
-try:
- _StringTypes = [types.StringType, types.UnicodeType]
-except AttributeError:
- _StringTypes = [types.StringType]
-
START_ELEMENT = "START_ELEMENT"
END_ELEMENT = "END_ELEMENT"
COMMENT = "COMMENT"
@@ -330,7 +325,7 @@ default_bufsize = (2 ** 14) - 20
def parse(stream_or_string, parser=None, bufsize=None):
if bufsize is None:
bufsize = default_bufsize
- if type(stream_or_string) in _StringTypes:
+ if isinstance(stream_or_string, basestring):
stream = open(stream_or_string)
else:
stream = stream_or_string