Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
178
Issues
178
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
e8b46de0
Commit
e8b46de0
authored
Jul 03, 2020
by
Quentin Defenouillere
Committed by
Vincent A
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bnporc] Handle unavailable website for Life Insurance with ConnectionError
parent
b6755c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/bnporc/pp/browser.py
modules/bnporc/pp/browser.py
+5
-3
No files found.
modules/bnporc/pp/browser.py
View file @
e8b46de0
...
...
@@ -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
()
try
:
# 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
(
self
.
capitalisation_page
.
build
(
params
=
params
),
allow_redirects
=
False
)
except
ServerError
:
except
(
ServerError
,
ConnectionError
)
:
self
.
logger
.
warning
(
"An Internal Server Error occurred"
)
else
:
if
self
.
capitalisation_page
.
is_here
()
and
self
.
page
.
has_contracts
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment