From 94a1fff7fa6ae5fcf7851a196f8957a4ef2d2068 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Sat, 22 Jan 2011 15:53:10 +0100 Subject: [PATCH] [creditmutuel] negative value correctly considered by 'list' --- weboob/backends/creditmutuel/pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weboob/backends/creditmutuel/pages.py b/weboob/backends/creditmutuel/pages.py index 87628a89..9bfbc405 100644 --- a/weboob/backends/creditmutuel/pages.py +++ b/weboob/backends/creditmutuel/pages.py @@ -45,9 +45,11 @@ class AccountsPage(BasePage): account.link_id = first_td.find('a').get('href', '') account.id = first_td.find('a').text.split(' ')[0]+first_td.find('a').text.split(' ')[1] s = tr.getchildren()[2].text + if s.strip() == "": + s = tr.getchildren()[1].text balance = u'' for c in s: - if c.isdigit(): + if c.isdigit() or c == '-': balance += c if c == ',': balance += '.'