Old exception handling format to new one

This commit is contained in:
Miroslav Stampar
2019-01-22 14:09:13 +01:00
parent ba356baab0
commit bdc4457f34
11 changed files with 26 additions and 27 deletions

View File

@@ -695,7 +695,7 @@ class XmlTokenizer:
self.final = len(data) < size
try:
self.parser.Parse(data, self.final)
except xml.parsers.expat.ExpatError, e:
except xml.parsers.expat.ExpatError as e:
#if e.code == xml.parsers.expat.errors.XML_ERROR_NO_ELEMENTS:
if e.code == 3:
pass