bnporc[ent]: Fix unknown page warning

We ignore the "/NSFR" page because it's easier to switch to another page
right away.
This commit is contained in:
Laurent Bachelier 2013-07-23 22:26:55 +02:00
commit 8dca8951b6
2 changed files with 8 additions and 3 deletions

View file

@ -20,7 +20,7 @@
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
from .pages import LoginPage, AccountsPage
from .pages import LoginPage, AccountsPage, UnknownPage
__all__ = ['BNPEnterprise']
@ -31,7 +31,8 @@ class BNPEnterprise(BaseBrowser):
CERTHASH = '423f68a8162d1328bacb48269675d8b8577ebcc9d222860de8421792c4d222c1'
PAGES = {'%s://%s/NSAccess.*' % (PROTOCOL, DOMAIN): LoginPage,
'%s://%s/UNE\?.*' % (PROTOCOL, DOMAIN): AccountsPage}
'%s://%s/UNE\?.*' % (PROTOCOL, DOMAIN): AccountsPage,
'%s://%s/NSFR' % (PROTOCOL, DOMAIN): UnknownPage}
def home(self):
self.location('%s://%s/NSAccess' % (self.PROTOCOL, self.DOMAIN))

View file

@ -29,7 +29,7 @@ from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard, VirtKeyboardEr
from weboob.tools.misc import to_unicode
__all__ = ['LoginPage', 'AccountsPage']
__all__ = ['LoginPage', 'AccountsPage', 'UnknownPage']
class Transaction(FrenchTransaction):
@ -143,3 +143,7 @@ class AccountsPage(BEPage):
account.currency = Account.get_currency(tdbalcur.text)
account._updated = datetime.strptime(tdupdated.text, '%d/%m/%Y')
yield account
class UnknownPage(BEPage):
pass