mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-14 05:31:25 -05:00
Use .format to format file sizes again
This commit is contained in:
parent
3085e4ee0f
commit
12d2bb700e
@ -437,7 +437,7 @@ class Common(object):
|
||||
"""
|
||||
thresh = 1024.0
|
||||
if b < thresh:
|
||||
return f"{b} B"
|
||||
return "{:.1f} B".format(b)
|
||||
units = ("KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB")
|
||||
u = 0
|
||||
b /= thresh
|
||||
|
Loading…
x
Reference in New Issue
Block a user