Commit e8b46de0 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Vincent A

[bnporc] Handle unavailable website for Life Insurance with ConnectionError

parent b6755c82
......@@ -21,9 +21,10 @@
from __future__ import unicode_literals
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
import time
from requests.exceptions import ConnectionError
from weboob.browser.browsers import LoginBrowser, URL, need_login, StatesMixin
......@@ -257,9 +258,10 @@ class BNPParibasBrowser(LoginBrowser, StatesMixin):
params = self.natio_vie_pro.go().get_params()
# When the space does not exist we land on a 302 that tries to redirect
# to an unexisting domain, hence the 'allow_redirects=False'
# to an unexisting domain, hence the 'allow_redirects=False'.
# Sometimes the Life Insurance space is unavailable, hence the 'ConnectionError'.
self.location(, allow_redirects=False)
except ServerError:
except (ServerError, ConnectionError):
self.logger.warning("An Internal Server Error occurred")
if self.capitalisation_page.is_here() and
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