From 54b7d45d25d311f184276b7d7ba701c2fa1ae2db Mon Sep 17 00:00:00 2001 From: Camille Baldock Date: Wed, 1 Feb 2012 19:08:28 +0100 Subject: [PATCH] fix bp bug (closes #758) --- modules/bp/pages/accountlist.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/bp/pages/accountlist.py b/modules/bp/pages/accountlist.py index 1fe1852b..3fbafd97 100644 --- a/modules/bp/pages/accountlist.py +++ b/modules/bp/pages/accountlist.py @@ -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)