From 391edde943c594f3c5dd43db09b87a3864836f1d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 10 Dec 2012 14:05:09 +0100 Subject: [PATCH] fix crash where there is no transactions for an account --- modules/banquepopulaire/pages.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 56a21324..83a40db4 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -140,6 +140,9 @@ class TransactionsPage(BasePage): for tr in self.document.xpath('//table[@id="tbl1"]/tbody/tr'): tds = tr.findall('td') + if len(tds) < 5: + continue + t = Transaction(tr.attrib['id'].split('_', 1)[1]) date = u''.join([txt.strip() for txt in tds[4].itertext()])