From ba244cef01132347df4d2d9553ea3105ba13a938 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 4 Jun 2020 12:39:11 +0200 Subject: [IMP] *: replace to new _() syntax Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error. --- addons/fetchmail/models/fetchmail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/fetchmail') diff --git a/addons/fetchmail/models/fetchmail.py b/addons/fetchmail/models/fetchmail.py index 67dce8c145b..da83677a02c 100644 --- a/addons/fetchmail/models/fetchmail.py +++ b/addons/fetchmail/models/fetchmail.py @@ -126,7 +126,7 @@ odoo_mailgate: "|/path/to/odoo-mailgate.py --host=localhost -u %(uid)d -p PASSWO server.write({'state': 'done'}) except Exception as err: _logger.info("Failed to connect to %s server %s.", server.server_type, server.name, exc_info=True) - raise UserError(_("Connection test failed: %s") % tools.ustr(err)) + raise UserError(_("Connection test failed: %s", tools.ustr(err))) finally: try: if connection: -- cgit v1.2.3