mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-25 15:29:42 -05:00
Use .format to format file sizes again
This commit is contained in:
parent
8dd60eed78
commit
057bb40a92
@ -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…
Reference in New Issue
Block a user