dont fail in parse_time if input is already a number

This commit is contained in:
j 2013-03-03 11:16:26 +00:00
parent b2b3459fa2
commit e94c146df0

View file

@ -33,6 +33,8 @@ def parse_time(t):
parse time string and return seconds as float parse time string and return seconds as float
''' '''
s = 0.0 s = 0.0
if isinstance(t, float) or isinstance(t, int):
return s
p = t.split(':') p = t.split(':')
for i in range(len(p)): for i in range(len(p)):
_p = p[i] _p = p[i]