From 2905657de328d41ee35f856501e737964bdf3ac9 Mon Sep 17 00:00:00 2001 From: Roberto Arista Date: Fri, 23 Feb 2024 12:21:38 +0100 Subject: [PATCH] Fix exception --- source/ElementTree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ElementTree.py b/source/ElementTree.py index 175c46c..c054b55 100644 --- a/source/ElementTree.py +++ b/source/ElementTree.py @@ -1638,7 +1638,7 @@ def doctype(self, name, pubid, system): def feed(self, data): try: self._parser.Parse(data, 0) - except self._error, v: + except self._error as v: self._raiseerror(v) ## @@ -1650,7 +1650,7 @@ def feed(self, data): def close(self): try: self._parser.Parse("", 1) # end of data - except self._error, v: + except self._error as v: self._raiseerror(v) tree = self.target.close() del self.target, self._parser # get rid of circular references