ms can be 0

This commit is contained in:
j 2009-01-23 10:32:20 +05:30
commit 556f878fc4
2 changed files with 2 additions and 2 deletions

View file

@ -174,7 +174,7 @@ def formatDuration(ms, verbosity=0, years=True, hours=True, milliseconds=True):
>>> formatDuration(1000 * 30, hours=False, milliseconds=False)
'00:30'
'''
if not ms:
if not ms and ms != 0:
return ''
if years:
y = int(ms / 31536000000)