summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-15 22:58:37 +0200
committerAnton Khirnov <anton@khirnov.net>2021-05-15 22:58:37 +0200
commitb9eda0c9541c652735f1dc4b8cab024c7a940d7e (patch)
tree2407e0efd4534c37eb59e4af40054cd008c75dca
parente3753ab3b371349cf43a138baa95de6cc91791fd (diff)
mail/attachment: add 'B' suffix to under-kB sizes
Displaying just a plain number leaves the user confused as to what the number means.
-rw-r--r--alot/mail/attachment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/mail/attachment.py b/alot/mail/attachment.py
index b8673fb9..33c651d2 100644
--- a/alot/mail/attachment.py
+++ b/alot/mail/attachment.py
@@ -17,7 +17,7 @@ def _humanize_size(size):
:returns: the human readable representation of size
:rtype: str
"""
- for factor, format_string in ((1, '%i'),
+ for factor, format_string in ((1, '%iB'),
(1024, '%iKiB'),
(1024 * 1024, '%.1fMiB')):
if size / factor < 1024: