Commit d978b119 authored by Nicolas VERGNAC's avatar Nicolas VERGNAC Committed by Vincent A

[wiseed] handle blocked account at login

user keep getting blocked account message on login
parent aef7ad21
......@@ -25,7 +25,7 @@
CleanText, CleanDecimal, Regexp, Coalesce,
)
from woob.browser.elements import method, ItemElement, TableElement
from woob.exceptions import BrowserIncorrectPassword
from woob.exceptions import BrowserIncorrectPassword, BrowserUserBanned
from woob.capabilities.base import NotAvailable
from woob.capabilities.wealth import Investment
from woob.tools.capabilities.bank.investments import create_french_liquidity
......@@ -42,7 +42,10 @@ def raise_error(self):
msg = CleanText('//div[has-class("alert-danger")]')(self.doc)
if 'Email ou mot de passe invalide' in msg:
raise BrowserIncorrectPassword(msg)
assert False, 'unhandled message %r' % msg
elif 'la connexion à votre compte est bloquée' in msg:
raise BrowserUserBanned(msg)
raise AssertionError('unhandled message : %s' % msg)
class LandPage(LoggedPage, HTMLPage):
......
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