From e94c146df0cdbc348fa324b42f6c3d4b3a459204 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 3 Mar 2013 11:16:26 +0000 Subject: [PATCH] dont fail in parse_time if input is already a number --- pandora/item/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/utils.py b/pandora/item/utils.py index fd0eee41..eb22963e 100644 --- a/pandora/item/utils.py +++ b/pandora/item/utils.py @@ -33,6 +33,8 @@ def parse_time(t): parse time string and return seconds as float ''' s = 0.0 + if isinstance(t, float) or isinstance(t, int): + return s p = t.split(':') for i in range(len(p)): _p = p[i]