From 30a0f916bfb8cfb1b1df265ee4d3621fbe36a9bf Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Sun, 1 Apr 2012 14:31:54 +0200 Subject: [PATCH] boursorama: ignore spurious accounts account.id must be a string. --- modules/boursorama/pages/accounts_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index 4241ca68..b7243615 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -35,6 +35,7 @@ class AccountsList(BasePage): if div.attrib.get('id', '') == 'synthese-list': for tr in div.getiterator('tr'): account = Account() + account.id = None for td in tr.getiterator('td'): if td.attrib.get('class', '') == 'account-cb': break @@ -63,7 +64,7 @@ class AccountsList(BasePage): else: # because of some weird useless - if account.id != 0: + if account.id is not None: l.append(account) return l