Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
47809a50 by Cédric Krier at 2023-07-15T00:40:59+02:00
Do not fail on ValueError when formatting message with gettext
If wrong variables are used to call gettext, the formatting may raise a
ValueError. It is better to not fail for such minor error when not testing.
Closes #12371
- - - - -
1 changed file:
- trytond/trytond/i18n.py
Changes:
=====================================
trytond/trytond/i18n.py
=====================================
@@ -26,7 +26,7 @@
return message_id
try:
return Message.gettext(module, id_, language, **variables)
- except KeyError:
+ except (KeyError, ValueError):
if pool.test:
raise
return message_id
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/47809a507263c47b927c318750f22499adecd036
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/47809a507263c47b927c318750f22499adecd036
You're receiving this email because of your account on foss.heptapod.net.