Fixed a bug
This commit is contained in:
parent
39eb088afc
commit
2ea7bffffb
1 changed files with 2 additions and 2 deletions
|
|
@ -125,9 +125,9 @@ def format_timedelta(delta, granularity='second', threshold=.85):
|
|||
if value >= threshold or unit == granularity:
|
||||
if unit == granularity and value > 0:
|
||||
value = max(1, value)
|
||||
value = str(int(round(value)))
|
||||
value = unicode(int(round(value)))
|
||||
value += u' ' + unit
|
||||
if value != 1:
|
||||
if value != u'1':
|
||||
value += u's'
|
||||
return value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue