From 5e267fb689698dd1488f020576d5e8b60cec847d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Wed, 25 Feb 2015 17:56:57 +0100 Subject: [PATCH] do not try to get IBAN for delegated accounts --- modules/bnporc/perso/accounts_list.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/bnporc/perso/accounts_list.py b/modules/bnporc/perso/accounts_list.py index 0e183f2a..d49ccbe7 100644 --- a/modules/bnporc/perso/accounts_list.py +++ b/modules/bnporc/perso/accounts_list.py @@ -54,7 +54,12 @@ class AccountsList(Page): account.type = typeid yield account elif tr.get('class', '') == 'listeActionBig' and account is not None: - self._parse_iban(account, tr.xpath('.//a')[-1].get('href', '')) + try: + url = tr.xpath('.//a')[-1].get('href', '') + except IndexError: + pass + else: + self._parse_iban(account, url) account = None def _parse_account(self, tr):