From 186d501406fe4872e43901c0ac1f8947cd2459f7 Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Mon, 9 Mar 2015 11:42:58 +0100 Subject: [PATCH] [biplan] do not crash when no time can be found --- modules/biplan/pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/biplan/pages.py b/modules/biplan/pages.py index 760e48c3..d9009414 100644 --- a/modules/biplan/pages.py +++ b/modules/biplan/pages.py @@ -69,7 +69,9 @@ class StartTime(Filter): a_time = content.split(' - ')[0] regexp = re.compile(ur'(?P\d+)h?(?P\d+)') m = regexp.search(a_time) - return time(int(m.groupdict()['hh'] or 0), int(m.groupdict()['mm'] or 0)) + if m: + return time(int(m.groupdict()['hh'] or 0), int(m.groupdict()['mm'] or 0)) + return time(0, 0) class EndTime(Filter):