fix bp bug (closes #758)

This commit is contained in:
Camille Baldock 2012-02-01 19:08:28 +01:00 committed by Romain Bignon
commit 54b7d45d25

View file

@ -50,14 +50,9 @@ class AccountList(BasePage):
account.label = tmp.text
account.link_id = tmp.get("href")
tmp = line.xpath("./td//strong")
if len(tmp) != 2:
tmp_id = line.xpath("./td//span")[1].text
tmp_balance = tmp[0].text
else:
tmp_id = tmp[0].text
tmp_balance = tmp[1].text
tmp = line.xpath("./td/span/strong")
tmp_id = tmp[0].text
tmp_balance = tmp[1].text
account.id = tmp_id
account.balance = float(''.join(tmp_balance.replace('.','').replace(',','.').split()))
self.account_list.append(account)