Revert "refactor: pass isfinal argument spelled-out not a number"
This reverts commit 6d65a87301b6c746ae0ec1dc1cf0df75c0c21d63. https://github.com/fonttools/fonttools/pull/3669#issuecomment-2428475144
This commit is contained in:
parent
6d65a87301
commit
7fadfa4e81
@ -38,7 +38,7 @@ def parseXML(xmlSnippet):
|
||||
% type(xmlSnippet).__name__
|
||||
)
|
||||
xml += b"</root>"
|
||||
reader.parser.Parse(xml, isfinal=True)
|
||||
reader.parser.Parse(xml, 1)
|
||||
return reader.root[2]
|
||||
|
||||
|
||||
|
@ -70,12 +70,12 @@ class XMLReader(object):
|
||||
while True:
|
||||
chunk = file.read(BUFSIZE)
|
||||
if not chunk:
|
||||
parser.Parse(chunk, isfinal=True)
|
||||
parser.Parse(chunk, 1)
|
||||
break
|
||||
pos = pos + len(chunk)
|
||||
if self.progress:
|
||||
self.progress.set(pos // 100)
|
||||
parser.Parse(chunk, isfinal=False)
|
||||
parser.Parse(chunk, 0)
|
||||
|
||||
def _startElementHandler(self, name, attrs):
|
||||
if self.stackSize == 1 and self.contentOnly:
|
||||
|
@ -1765,7 +1765,7 @@ class _BaseParser:
|
||||
parser = ParserCreate()
|
||||
parser.StartElementHandler = self.startElementHandler
|
||||
parser.EndElementHandler = self.endElementHandler
|
||||
parser.Parse(text, isfinal=True)
|
||||
parser.Parse(text, 1)
|
||||
|
||||
def startElementHandler(self, name, attrs):
|
||||
self._elementStack.append(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user