From: Guido van Rossum Date: Fri, 27 Jul 2007 17:26:00 +0000 (+0000) Subject: SF patch# 1759922 by Alexandre Vassalotti. X-Git-Tag: v3.0a1~570 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3992db81b6c4050a26f7e242b1f16fee245b3127;p=python SF patch# 1759922 by Alexandre Vassalotti. Fix one of the two failing tests for minidom. --- diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py index fe9a3a2196..c1463c91c0 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