From 902fec0f5b42d12064cd5a8b62291a04dd3b9afc Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Wed, 10 Dec 2014 19:03:23 +0100 Subject: [PATCH] detection of disabled accounts --- modules/bred/bred/browser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/bred/bred/browser.py b/modules/bred/bred/browser.py index 4e0f070e..e2d8dc0f 100644 --- a/modules/bred/bred/browser.py +++ b/modules/bred/bred/browser.py @@ -42,8 +42,10 @@ class BredBrowser(DomainBrowser): def do_login(self, login, password): self.location('/transactionnel/Authentication', data={'identifiant': login, 'password': password}) - if 'erreur-pwd' in self.url: - raise BrowserIncorrectPassword() + if 'gestion-des-erreurs/erreur-pwd' in self.url: + raise BrowserIncorrectPassword('Bad login/password.') + if 'gestion-des-erreurs/opposition' in self.url: + raise BrowserIncorrectPassword('Your account is disabled') ACCOUNT_TYPES = {'000': Account.TYPE_CHECKING, '999': Account.TYPE_MARKET,