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 02b6051a authored by Martin Lavoie's avatar Martin Lavoie Committed by Vincent A

[boursorama] Update broken life insurance detection

These life insurance accounts are broken on the website too.

Close: 1113@sibi (maybe not all occurence) 1200403491153723@asana
parent a94a1717
......@@ -483,15 +483,18 @@ def get_filled_accounts(self, pro=False):
try:
self.location(account.url)
except requests.exceptions.HTTPError as e:
# We do not yield life insurance accounts with a 404 error. Since we have verified, that
# We do not yield life insurance accounts with a 404 or 503 error. Since we have verified, that
# it is a website scoped problem and not a bad request from our part.
# 404 is the original behavior. We could remove it in the future if it does not happen again.
status_code = e.response.status_code
if (
e.response.status_code == 404
status_code in (404, 503)
and account.type == Account.TYPE_LIFE_INSURANCE
):
self.logger.warning(
'404 ! Broken link for life insurance account (%s). Account will be skipped',
account.label
'%s ! Broken link for life insurance account (%s). Account will be skipped',
status_code,
account.label,
)
continue
raise
......
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