From f0310dc576c9acad7bf595212c3c02924859e4fe Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 29 Sep 2013 17:54:57 +0200 Subject: [PATCH] fix crash when there is no link on an opening account --- modules/boursorama/pages/accounts_list.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index 3724ef58..abab9f05 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -48,7 +48,10 @@ class AccountsList(BasePage): # ignore account break account.label = self.parser.tocleanstring(span) - account._link_id = td.xpath('.//a')[0].attrib['href'] + try: + account._link_id = td.xpath('.//a')[0].attrib['href'] + except KeyError: + pass elif td.attrib.get('class', '') == 'account-more-actions': for a in td.getiterator('a'):