[FIX] convert: properly catch Value/Name Errors

This commit is contained in:
Olivier Dony
2016-10-03 23:41:44 +02:00
parent ba7880a249
commit 3d55aff1c8
+2 -2
View File
@@ -257,7 +257,7 @@ class xml_import(object):
context.update(ctx_res)
else:
context = ctx_res
except ValueError, NameError:
except (ValueError, NameError):
# Some contexts contain references that are only valid at runtime at
# client-side, so in that case we keep the original context string
# as it is. We also log it, just in case.
@@ -446,7 +446,7 @@ form: module.record_id""" % (xml_id,)
try:
domain = safe_eval(domain, eval_context)
except NameError:
except (ValueError, NameError):
# Some domains contain references that are only valid at runtime at
# client-side, so in that case we keep the original domain string
# as it is. We also log it, just in case.