mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-27 09:51:17 -05:00
Fix issue mentioned by @mig5
This commit is contained in:
parent
979242b478
commit
5880741c9d
@ -166,11 +166,11 @@ def format_seconds(seconds):
|
|||||||
|
|
||||||
human_readable = []
|
human_readable = []
|
||||||
if days:
|
if days:
|
||||||
human_readable.append("{}d".format(days))
|
human_readable.append("{:.0f}d".format(days))
|
||||||
if hours:
|
if hours:
|
||||||
human_readable.append("{}h".format(hours))
|
human_readable.append("{:.0f}h".format(hours))
|
||||||
if minutes:
|
if minutes:
|
||||||
human_readable.append("{}m".format(minutes))
|
human_readable.append("{:.0f}m".format(minutes))
|
||||||
if seconds or not human_readable:
|
if seconds or not human_readable:
|
||||||
human_readable.append("{:.0f}s".format(seconds))
|
human_readable.append("{:.0f}s".format(seconds))
|
||||||
return ''.join(human_readable)
|
return ''.join(human_readable)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user