summaryrefslogtreecommitdiff
path: root/odoo/tools/xml_utils.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-04-11 12:44:29 +0200
committerXavier Morel <xmo@odoo.com>2017-04-11 14:53:29 +0200
commit3979f6802eeea275f949d28ddf4c18f84fc0f5aa (patch)
tree0c67d60c80b2ece2e452837c187a79e9444334d8 /odoo/tools/xml_utils.py
parentca74b5e1c8a48bcdeb396625ec0d8028a5a9d5f1 (diff)
[#8530] convert exception handlers to except..as syntax
Futurize fixers: * lib2to3.fixes.fix_except
Diffstat (limited to 'odoo/tools/xml_utils.py')
-rw-r--r--odoo/tools/xml_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tools/xml_utils.py b/odoo/tools/xml_utils.py
index d179559db75..df4c5669644 100644
--- a/odoo/tools/xml_utils.py
+++ b/odoo/tools/xml_utils.py
@@ -10,7 +10,7 @@ def check_with_xsd(tree_or_str, xsd_path):
xsd_schema = etree.XMLSchema(xml_schema_doc)
try:
xsd_schema.assertValid(tree_or_str)
- except etree.DocumentInvalid, xml_errors:
+ except etree.DocumentInvalid as xml_errors:
#import UserError only here to avoid circular import statements with tools.func being imported in exceptions.py
from odoo.exceptions import UserError
raise UserError('\n'.join([e.message for e in xml_errors.error_log]))