Commit 7a598e45 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[sgpe] handle incorrect password for 'societe generale entreprise'

parent 522ac040
......@@ -31,7 +31,7 @@ from weboob.capabilities.base import Currency
from weboob.capabilities import NotAvailable
from import Account
from weboob.capabilities.bill import Document, Subscription
from weboob.exceptions import BrowserUnavailable, NoAccountsException
from weboob.exceptions import BrowserUnavailable, NoAccountsException, BrowserIncorrectPassword
from import is_iban_valid
from import FrenchTransaction
from import quote_plus
......@@ -56,10 +56,12 @@ class AccountsJsonPage(LoggedPage, JsonPage):
def on_load(self):
if self.doc['commun']['statut'] == 'NOK':
if self.doc['commun']['statut'].lower() == 'nok':
reason = self.doc['commun']['raison']
raise NoAccountsException("Vous n'avez pas l'autorisation de consulter : {}".format(reason))
elif reason == 'niv_auth_insuff':
raise BrowserIncorrectPassword('Vos identifiants sont incorrects')
raise BrowserUnavailable(reason)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment