bnporc better handle of expired password

This commit is contained in:
Baptiste Delpey 2015-08-17 15:25:27 +02:00 committed by Romain Bignon
commit e0a57153ed
2 changed files with 6 additions and 6 deletions

View file

@ -24,7 +24,6 @@ from weboob.browser import LoginBrowser, URL, need_login
from weboob.capabilities.base import find_object
from weboob.capabilities.bank import AccountNotFound
from weboob.tools.json import json
from weboob.exceptions import BrowserPasswordExpired
from .pages import LoginPage, AccountsPage, AccountsIBANPage, HistoryPage, TransferInitPage, ConnectionThresholdPage
@ -69,7 +68,9 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
'https://mabanqueprivee.bnpparibas.net/fr/espace-prive/comptes-et-contrats\?u=%2FSEEA-pa01%2FdevServer%2Fseeaserver',
LoginPage)
con_threshold = URL('/fr/connexion/100-connexions',
'/fr/espace-prive/100-connexions.*', ConnectionThresholdPage)
'/fr/espace-prive/100-connexions.*',
'/fr/espace-pro/100-connexions-pro.*',
'/fr/systeme/page-indisponible', ConnectionThresholdPage)
accounts = URL('udc-wspl/rest/getlstcpt', AccountsPage)
ibans = URL('rib-wspl/rpc/comptes', AccountsIBANPage)
history = URL('rop-wspl/rest/releveOp', HistoryPage)
@ -91,8 +92,6 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
self.login.go(timestamp=timestamp())
if self.login.is_here():
self.page.login(self.username, self.password)
if self.con_threshold.is_here():
raise BrowserPasswordExpired(u'Vous avez atteint le seuil de 100 connexions avec le même code secret. Par mesure de sécurité, veuillez le changer.')
@need_login
def get_accounts_list(self):