From b230543aeb5e0b3eb1b2a73b2463042cb3ba81e0 Mon Sep 17 00:00:00 2001 From: Pierre Nardozi Date: Fri, 5 Jun 2020 14:42:17 +0200 Subject: [PATCH] [creditdunord] add ActionNeeded for SCA and SCAW --- modules/creditdunord/browser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/creditdunord/browser.py b/modules/creditdunord/browser.py index b609f77126..9047e6930d 100644 --- a/modules/creditdunord/browser.py +++ b/modules/creditdunord/browser.py @@ -83,9 +83,14 @@ def do_login(self): if self.page.get_status() != 'ok': raise BrowserIncorrectPassword() - elif self.page.get_reason() == 'chgt_mdp_oblig': + reason = self.page.get_reason() + if reason == 'chgt_mdp_oblig': # There is no message in the json return. There is just the code. raise BrowserPasswordExpired('Changement de mot de passe requis.') + elif reason == 'SCA': + raise ActionNeeded("Vous devez réaliser la double authentification sur le portail internet") + elif reason == 'SCAW': + raise ActionNeeded("Vous devez choisir si vous souhaitez dès à présent activer la double authentification sur le portail internet") self.entrypage.go() -- GitLab