diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py index c381fd48931..fea674bbaf9 100644 --- a/Lib/xml/sax/xmlreader.py +++ b/Lib/xml/sax/xmlreader.py @@ -85,8 +85,6 @@ def setProperty(self, name, value): "Sets the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) -import saxutils - class IncrementalParser(XMLReader): """This interface adds three extra methods to the XMLReader interface that allow XML parsers to support incremental @@ -112,6 +110,7 @@ def __init__(self, bufsize=2**16): XMLReader.__init__(self) def parse(self, source): + import saxutils source = saxutils.prepare_input_source(source) self.prepareParser(source)