Fix some exception handling.

This commit is contained in:
Tim 2015-07-07 21:24:47 +02:00
parent 7a5cad1a31
commit 857e9e9d1c
3 changed files with 45 additions and 32 deletions

View file

@ -115,10 +115,13 @@ def convert_milliseconds(ms):
def convert_milliseconds_to_minutes(ms):
seconds = float(ms) / 1000
minutes = round(seconds / 60, 0)
if ms.isdigit():
seconds = float(ms) / 1000
minutes = round(seconds / 60, 0)
return math.trunc(minutes)
return math.trunc(minutes)
return 0
def convert_seconds(s):