ms can be 0

This commit is contained in:
j 2009-01-23 10:32:20 +05:30
parent b70005010d
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) >>> formatDuration(1000 * 30, hours=False, milliseconds=False)
'00:30' '00:30'
''' '''
if not ms: if not ms and ms != 0:
return '' return ''
if years: if years:
y = int(ms / 31536000000) y = int(ms / 31536000000)

View file

@ -6,7 +6,7 @@ from setuptools import setup, find_packages
setup( setup(
name="oxlib", name="oxlib",
version="0.1", version="0.1",
description="python-oxlib some tools to build toos", description="python-oxlib some tools to build tools",
author="0x", author="0x",
author_email="code@0xdb.org", author_email="code@0xdb.org",
url="http://code.0xdb.org/oxlib", url="http://code.0xdb.org/oxlib",