fix crash on a new tab
This commit is contained in:
parent
06e4851265
commit
95e4e0d887
1 changed files with 4 additions and 2 deletions
|
|
@ -112,6 +112,10 @@ class AccountsPage(BasePage):
|
||||||
for table in self.document.getroot().cssselect('div#table-panorama table.table-client'):
|
for table in self.document.getroot().cssselect('div#table-panorama table.table-client'):
|
||||||
account = Account()
|
account = Account()
|
||||||
|
|
||||||
|
tds = table.xpath('./tbody/tr')[0].findall('td')
|
||||||
|
if len(tds) < 3:
|
||||||
|
continue
|
||||||
|
|
||||||
link = table.xpath('./tfoot//a')[0]
|
link = table.xpath('./tfoot//a')[0]
|
||||||
if not 'onclick' in link.attrib:
|
if not 'onclick' in link.attrib:
|
||||||
continue
|
continue
|
||||||
|
|
@ -140,8 +144,6 @@ class AccountsPage(BasePage):
|
||||||
else:
|
else:
|
||||||
account.currency = account.get_currency(m.group(1))
|
account.currency = account.get_currency(m.group(1))
|
||||||
|
|
||||||
tds = table.xpath('./tbody/tr')[0].findall('td')
|
|
||||||
|
|
||||||
account.balance = Decimal(FrenchTransaction.clean_amount(u''.join([txt.strip() for txt in tds[-1].itertext()])))
|
account.balance = Decimal(FrenchTransaction.clean_amount(u''.join([txt.strip() for txt in tds[-1].itertext()])))
|
||||||
account._args = args
|
account._args = args
|
||||||
yield account
|
yield account
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue