Commit 2bf5d41a authored by Florian Duguet's avatar Florian Duguet Committed by Romain Bignon

[bouygues] return message for wrongpass

if we didn't provide lastname when bouygues ask us
parent d8bb4f30
......@@ -22,6 +22,7 @@ import re
from datetime import datetime, timedelta
from weboob.capabilities.messages import CantSendMessage
from weboob.exceptions import BrowserIncorrectPassword
from weboob.capabilities.base import NotLoaded
from weboob.capabilities.bill import Bill, Subscription
......@@ -34,12 +35,14 @@ from weboob.browser.elements import DictElement, ItemElement, method
class LoginPage(HTMLPage):
def login(self, login, password, lastname):
form = self.get_form('//form[@id="log_data"]')
form = self.get_form(id='log_data')
form['username'] = login
form['password'] = password
if 'lastname' in form:
if not lastname:
raise BrowserIncorrectPassword('Le nom de famille est obligatoire.')
form['lastname'] = lastname
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