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

@@ -1100,7 +1100,7 @@ def _ParseFileEx(file, base_uri,
data = file.read(CHUNK)
try:
fp.feed(data)
except ParseError, e:
except ParseError as e:
e.base_uri = base_uri
raise
if len(data) != CHUNK: break
@@ -2902,7 +2902,7 @@ class HTMLForm:
control = self.find_control(name)
try:
control.value = value
except AttributeError, e:
except AttributeError as e:
raise ValueError(str(e))
def get_value(self,