From 6704532ae3459841bfc2e9b518f65f021ccb7d2d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 20 Mar 2014 19:46:29 +0100 Subject: [PATCH] fix crash when coming list is empty --- modules/alloresto/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/alloresto/pages.py b/modules/alloresto/pages.py index b3015222..1f77803b 100644 --- a/modules/alloresto/pages.py +++ b/modules/alloresto/pages.py @@ -21,7 +21,7 @@ import datetime from decimal import Decimal -from weboob.tools.browser import BasePage, BrokenPageError +from weboob.tools.browser import BasePage from weboob.capabilities.bank import Account from weboob.tools.capabilities.bank.transactions import FrenchTransaction as Transaction @@ -46,7 +46,7 @@ class AccountsPage(BasePage): a.currency = u'MIAM' try: a.coming = Decimal(Transaction.clean_amount(self.document.xpath('//table[@id="solde_acquisition_lignes"]//th[@class="col_montant"]')[0].text)) - except BrokenPageError: + except IndexError: a.coming = Decimal('0') yield a