[IMP] server_environment: don't print stack trace when the field can't be read

This commit is contained in:
Ivàn Todorovich 2022-07-12 11:38:38 -03:00 committed by Marcos Oitaben
parent 5900959de7
commit d847929adb
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
{
"name": "server configuration environment files",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"depends": ["base", "base_sparse_field"],
"author": "Camptocamp,Odoo Community Association (OCA)",
"summary": "move some configurations out of the database",

View File

@ -195,9 +195,9 @@ class ServerEnvMixin(models.AbstractModel):
value = getter(section_name, field_name)
else:
value = getter(global_section_name, field_name)
except Exception:
_logger.exception(
"error trying to read field %s in section %s", field_name, section_name
except Exception as e:
_logger.error(
"Unable to read field %s in section %s: %s", field_name, section_name, e
)
return False
return value