From 3cbf1d13a60e951b269d6c15ff4ebef47e86f6d1 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Sun, 10 Feb 2013 13:38:05 +0100 Subject: [PATCH] [creditmut] transfer now accepts long and short IDs --- modules/creditmutuel/pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 0c5e8e9f..5b9460db 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -50,6 +50,7 @@ class UserSpacePage(BasePage): pass class AccountsPage(BasePage): + ALL_EXCEPT_DIGITS = re.compile("[^0-9]*") def get_list(self): accounts = OrderedDict() @@ -85,7 +86,8 @@ class AccountsPage(BasePage): continue account = Account() - account.id = id + # the id is only formed by digits + account.id = self.ALL_EXCEPT_DIGITS.sub('',id) account.label = unicode(a.text).strip().lstrip(' 0123456789').title() account._link_id = link account._card_links = []