Commit 0a4e346c authored by Baptiste Delpey's avatar Baptiste Delpey Committed by Romain Bignon

Revert "[caissedepargne] Add try/except on Loans request"

This reverts commit 54d4de1023903b47e883e505efe74b9b1bf2a6b5.
parent c3dad367
......@@ -32,7 +32,7 @@ from weboob.browser.url import URL
from import Account, AddRecipientStep, Recipient, TransferBankError, Transaction, TransferStep
from weboob.capabilities.base import NotAvailable
from weboob.capabilities.profile import Profile
from weboob.browser.exceptions import BrowserHTTPNotFound, ClientError, ServerError
from weboob.browser.exceptions import BrowserHTTPNotFound, ClientError
from weboob.exceptions import (
BrowserIncorrectPassword, BrowserUnavailable, BrowserHTTPError, BrowserPasswordExpired, ActionNeeded
......@@ -445,26 +445,15 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
if or
return []
access_to_loans = False
max_count = 0
while not access_to_loans and max_count < 5:
for _ in range(3):
if self.home.is_here():
for _ in range(3):
if self.home.is_here():
if not
# The server often returns a 520 error (Undefined):
try: = list(
except ServerError:
self.logger.warning('Access to loans failed, we try again')
max_count += 1
access_to_loans = True
if not access_to_loans:
raise BrowserUnavailable()
if self.home.is_here():
if not = list(
for _ in range(3):
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