From 057bb40a924d083e9de3a12e99eeefa89d5dcd2c Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 20 Oct 2019 18:14:00 -0700 Subject: [PATCH] Use .format to format file sizes again --- onionshare/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare/common.py b/onionshare/common.py index 0a193d23..d97f0ccb 100644 --- a/onionshare/common.py +++ b/onionshare/common.py @@ -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