Commit b0398c4e authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[caissedepargne] Remove access_to_loans boolean

It turns out this boolean is useless, after 5 tries if we didn't manage
to reach the loans we just return self.loans = []
There is no need to raise BrowserUnavailable() if we didn't get there.

Closes: 41162@sibi
parent 8d483fd0
......@@ -445,7 +445,6 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
if self.page.check_no_accounts() or self.page.check_no_loans():
return []
access_to_loans = False
for trial in range(5):
for _ in range(3):
self.home_tache.go(tache='CRESYNT0')
......@@ -461,12 +460,8 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
self.logger.warning('Access to loans failed, we try again')
else:
# We managed to reach the Loans JSON
access_to_loans = True
break
if not access_to_loans:
raise BrowserUnavailable()
for _ in range(3):
try:
self.home_tache.go(tache='CPTSYNT0')
......
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