From a3d1c8daa553f0f777631d83bbd4c6f746a8d5c4 Mon Sep 17 00:00:00 2001 From: Xavier G Date: Tue, 9 Oct 2012 19:17:22 +0200 Subject: [PATCH] CrAgr: fixed specific date parsing. --- modules/cragr/pages/accounts_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cragr/pages/accounts_list.py b/modules/cragr/pages/accounts_list.py index 4e574172..e6139a50 100644 --- a/modules/cragr/pages/accounts_list.py +++ b/modules/cragr/pages/accounts_list.py @@ -277,7 +277,7 @@ class AccountsList(CragrBasePage): """ Builds a date object from a 'DD/MM' string """ - matches = re.search('([012]?[0-9]|3[01])\s*/\s*(0?[1-9]|1[012])', string) + matches = re.search('\s*([012]?[0-9]|3[01])\s*/\s*(0?[1-9]|1[012])\s*$', string) if matches is None: return self.fallback_date() return self.date_from_day_month(int(matches.group(1)), int(matches.group(2)))