[creditmutuel] negative value correctly considered by 'list'

This commit is contained in:
Julien Veyssier 2011-01-22 15:53:10 +01:00
commit 94a1fff7fa

View file

@ -45,9 +45,11 @@ class AccountsPage(BasePage):
account.link_id = first_td.find('a').get('href', '') 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] account.id = first_td.find('a').text.split(' ')[0]+first_td.find('a').text.split(' ')[1]
s = tr.getchildren()[2].text s = tr.getchildren()[2].text
if s.strip() == "":
s = tr.getchildren()[1].text
balance = u'' balance = u''
for c in s: for c in s:
if c.isdigit(): if c.isdigit() or c == '-':
balance += c balance += c
if c == ',': if c == ',':
balance += '.' balance += '.'