Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3992db8

Browse files
committed
SF patch# 1759922 by Alexandre Vassalotti.
Fix one of the two failing tests for minidom.
1 parent 624ab7c commit 3992db8

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Lib/xml/dom/pulldom.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
import xml.sax.handler
33
import types
44

5-
try:
6-
_StringTypes = [types.StringType, types.UnicodeType]
7-
except AttributeError:
8-
_StringTypes = [types.StringType]
9-
105
START_ELEMENT = "START_ELEMENT"
116
END_ELEMENT = "END_ELEMENT"
127
COMMENT = "COMMENT"
@@ -330,7 +325,7 @@ def characters(self, chars):
330325
def parse(stream_or_string, parser=None, bufsize=None):
331326
if bufsize is None:
332327
bufsize = default_bufsize
333-
if type(stream_or_string) in _StringTypes:
328+
if isinstance(stream_or_string, basestring):
334329
stream = open(stream_or_string)
335330
else:
336331
stream = stream_or_string

0 commit comments

Comments
 (0)