From 7ef1ffb87c5f8a7dcda9beba5ef2636cb676c2b6 Mon Sep 17 00:00:00 2001 From: Vincent Paredes Date: Mon, 30 Mar 2015 15:44:03 +0200 Subject: [PATCH] handling account with no history --- modules/creditdunord/pages.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index 78a620b1..bd6e6cc4 100644 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -150,6 +150,10 @@ class ProAccountsPage(AccountsPage): for sub in re.findall("'([^']*)'", text): l.append(sub) + if len(l) == 0: + #For account that have no history + return None, None + kind = self.group_dict['kind'] url = '/vos-comptes/IPT/appmanager/transac/' + kind + '?_nfpb=true&_windowLabel=portletInstance_18&_pageLabel=page_synthese_v1' + '&_cdnCltUrl=' + "/transacClippe/" + quote(l.pop(0)) args = {}