[biplan] do not crash when no time can be found
This commit is contained in:
parent
cdc4410170
commit
186d501406
1 changed files with 3 additions and 1 deletions
|
|
@ -69,7 +69,9 @@ class StartTime(Filter):
|
|||
a_time = content.split(' - ')[0]
|
||||
regexp = re.compile(ur'(?P<hh>\d+)h?(?P<mm>\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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue