Fix exception in some cases
When self.loggedpage.is_here is false, we try to raise a browserIncorrectPassword(error). Sadly, error is not set. If we are not on the login page, we are in an unknown state (the site is perhaps down?)
This commit is contained in:
parent
b3aabdeeaf
commit
72aaed43fb
1 changed files with 3 additions and 1 deletions
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.browser import LoginBrowser, URL, need_login
|
||||
from weboob.exceptions import BrowserIncorrectPassword
|
||||
from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable
|
||||
|
||||
from .pages import LoginPage, CreditLoggedPage, AccountsPage, TransactionsPage, TransactionsJSONPage, ComingTransactionsPage
|
||||
|
||||
|
|
@ -51,6 +51,8 @@ class CreditCooperatif(LoginBrowser):
|
|||
error = self.page.get_error()
|
||||
if error is None:
|
||||
return
|
||||
else:
|
||||
raise BrowserUnavailable("not on the login page")
|
||||
|
||||
raise BrowserIncorrectPassword(error)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue