The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit 5056cfbf authored by yidwy's avatar yidwy Committed by Vincent A

[bp] added an error_message condition on get_loans

parent b70779b6
......@@ -650,10 +650,14 @@ def get_loans(self, account):
student_loan.currency = account.currency
loans.append(student_loan)
else:
# The main revolving page is not accessible, we can reach it by this new way
self.go_revolving()
revolving_loan = self.page.get_revolving_attributes(account)
loans.append(revolving_loan)
if self.page.get_error():
self.logger.warning('Details are not available for this revolving account: %s', account.id)
else:
revolving_loan = self.page.get_revolving_attributes(account)
loans.append(revolving_loan)
return loans
@retry(BrowserUnavailable, delay=5)
......
......@@ -654,3 +654,6 @@ def get_revolving_attributes(self, account):
loan._has_cards = False
loan.type = Account.TYPE_REVOLVING_CREDIT
return loan
def get_error(self):
return CleanText('//td[contains(text(), "momentanément indisponible.")]')(self.doc)
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