Commit 52587383 authored by Romain Pesche's avatar Romain Pesche Committed by Vincent A

[bouygues] handle 401 error on login

parent 2f882edd
......@@ -23,7 +23,7 @@ from time import time
from jose import jwt
from weboob.browser import LoginBrowser, URL, need_login
from weboob.browser.exceptions import HTTPNotFound
from weboob.browser.exceptions import HTTPNotFound, ClientError
from weboob.exceptions import BrowserIncorrectPassword
from import urlparse, parse_qsl
......@@ -65,7 +65,13 @@ class BouyguesBrowser(LoginBrowser):
def do_login(self):
self.login_page.go(), self.password, self.lastname)
try:, self.password, self.lastname)
except ClientError as e:
if e.response.status_code == 401:
raise BrowserIncorrectPassword()
if self.login_page.is_here():
msg =
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