mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-07 06:13:03 -04:00
Use .format to format file sizes again
This commit is contained in:
parent
8dd60eed78
commit
057bb40a92
1 changed files with 1 additions and 1 deletions
|
@ -437,7 +437,7 @@ class Common(object):
|
||||||
"""
|
"""
|
||||||
thresh = 1024.0
|
thresh = 1024.0
|
||||||
if b < thresh:
|
if b < thresh:
|
||||||
return f"{b} B"
|
return "{:.1f} B".format(b)
|
||||||
units = ("KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB")
|
units = ("KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB")
|
||||||
u = 0
|
u = 0
|
||||||
b /= thresh
|
b /= thresh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue