merge LoginPage and Login2Page to prevent problems when the website fails with 500

This commit is contained in:
Romain Bignon 2013-02-10 18:54:30 +01:00
commit 2ef5791cf8
3 changed files with 5 additions and 11 deletions

View file

@ -20,7 +20,7 @@ import hashlib
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
from weboob.capabilities.bank import Account, TransferError from weboob.capabilities.bank import Account, TransferError
from .pages import AccountsList, LoginPage, LoginPage2, \ from .pages import AccountsList, LoginPage, \
AccountHistory, TransferPage, TransferConfirmPage, \ AccountHistory, TransferPage, TransferConfirmPage, \
BillsPage, StopPage BillsPage, StopPage
@ -35,8 +35,7 @@ class Ing(BaseBrowser):
#DEBUG_HTTP = True #DEBUG_HTTP = True
ENCODING = None # refer to the HTML encoding ENCODING = None # refer to the HTML encoding
PAGES = {'.*displayTRAccountSummary.*': AccountsList, PAGES = {'.*displayTRAccountSummary.*': AccountsList,
'.*displayLogin.jsf': LoginPage, '.*displayLogin.jsf.*': LoginPage,
'.*displayLogin.jsf.+': LoginPage2,
'.*accountDetail.jsf.*': AccountHistory, '.*accountDetail.jsf.*': AccountHistory,
'.*displayTRHistorique.*': AccountHistory, '.*displayTRHistorique.*': AccountHistory,
'.*transferManagement.jsf': TransferPage, '.*transferManagement.jsf': TransferPage,

View file

@ -20,7 +20,7 @@
from .accounts_list import AccountsList from .accounts_list import AccountsList
from .account_history import AccountHistory from .account_history import AccountHistory
from .login import LoginPage, LoginPage2, StopPage from .login import LoginPage, StopPage
from .transfer import TransferPage, TransferConfirmPage from .transfer import TransferPage, TransferConfirmPage
from .bills import BillsPage from .bills import BillsPage
@ -29,6 +29,5 @@ class AccountPrelevement(AccountsList):
pass pass
__all__ = ['AccountsList', 'AccountHistory', 'LoginPage', __all__ = ['AccountsList', 'AccountHistory', 'LoginPage',
'LoginPage2', 'AccountPrelevement', 'AccountPrelevement', 'TransferPage', 'TransferConfirmPage',
'TransferPage', 'TransferConfirmPage',
'BillsPage', 'StopPage'] 'BillsPage', 'StopPage']

View file

@ -26,7 +26,7 @@ from weboob.tools.captcha.virtkeyboard import VirtKeyboard, VirtKeyboardError
import tempfile import tempfile
__all__ = ['LoginPage', 'LoginPage2', 'INGVirtKeyboard', 'StopPage'] __all__ = ['LoginPage', 'INGVirtKeyboard', 'StopPage']
class INGVirtKeyboard(VirtKeyboard): class INGVirtKeyboard(VirtKeyboard):
@ -108,10 +108,6 @@ class LoginPage(BasePage):
return err is not None return err is not None
class LoginPage2(BasePage):
def on_loaded(self):
pass
def login(self, password): def login(self, password):
# 2) And now, the virtual Keyboard # 2) And now, the virtual Keyboard
try: try: