summaryrefslogtreecommitdiff
path: root/addons/auth_signup/controllers/main.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-04-11 12:44:29 +0200
committerXavier Morel <xmo@odoo.com>2017-04-11 14:53:29 +0200
commit3979f6802eeea275f949d28ddf4c18f84fc0f5aa (patch)
tree0c67d60c80b2ece2e452837c187a79e9444334d8 /addons/auth_signup/controllers/main.py
parentca74b5e1c8a48bcdeb396625ec0d8028a5a9d5f1 (diff)
[#8530] convert exception handlers to except..as syntax
Futurize fixers: * lib2to3.fixes.fix_except
Diffstat (limited to 'addons/auth_signup/controllers/main.py')
-rw-r--r--addons/auth_signup/controllers/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index 0ddca4cc626..6c1b0facad3 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -33,7 +33,7 @@ class AuthSignupHome(Home):
try:
self.do_signup(qcontext)
return super(AuthSignupHome, self).web_login(*args, **kw)
- except (SignupError, AssertionError), e:
+ except (SignupError, AssertionError) as e:
if request.env["res.users"].sudo().search([("login", "=", qcontext.get("login"))]):
qcontext["error"] = _("Another user is already registered using this email address.")
else:
@@ -62,7 +62,7 @@ class AuthSignupHome(Home):
except SignupError:
qcontext['error'] = _("Could not reset your password")
_logger.exception('error when resetting password')
- except Exception, e:
+ except Exception as e:
qcontext['error'] = e.message or e.name
response = request.render('auth_signup.reset_password', qcontext)