diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-04-11 12:44:29 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-04-11 14:53:29 +0200 |
| commit | 3979f6802eeea275f949d28ddf4c18f84fc0f5aa (patch) | |
| tree | 0c67d60c80b2ece2e452837c187a79e9444334d8 /addons/gamification | |
| parent | ca74b5e1c8a48bcdeb396625ec0d8028a5a9d5f1 (diff) | |
[#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
Diffstat (limited to 'addons/gamification')
| -rw-r--r-- | addons/gamification/models/goal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index d9ebb699cd0..1e9975ea97f 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -85,7 +85,7 @@ class GoalDefinition(models.Model): }) # dummy search to make sure the domain is valid Obj.search_count(domain) - except (ValueError, SyntaxError), e: + except (ValueError, SyntaxError) as e: msg = e.message or (e.msg + '\n' + e.text) raise exceptions.UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s") % (definition.name, msg)) return True @@ -102,7 +102,7 @@ class GoalDefinition(models.Model): if not (field and field.store): raise exceptions.UserError( _("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not stored") % (definition.name, definition.field_id.name)) - except KeyError, e: + except KeyError as e: raise exceptions.UserError( _("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not found") % (definition.name, e.message)) |
