From 95a7d3d1dea24ac90bb22114fb52728fa3c42a2e Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 24 Apr 2019 11:45:04 -0400 Subject: [PATCH] add space in human readable sizes --- archivebox/legacy/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archivebox/legacy/util.py b/archivebox/legacy/util.py index 80dc1285..327f0270 100644 --- a/archivebox/legacy/util.py +++ b/archivebox/legacy/util.py @@ -587,9 +587,9 @@ def get_dir_size(path: str, recursive: bool=True, pattern: Optional[str]=None) - def human_readable_size(num_bytes: Union[int, float]) -> str: for count in ['Bytes','KB','MB','GB']: if num_bytes > -1024.0 and num_bytes < 1024.0: - return '%3.1f%s' % (num_bytes, count) + return '%3.1f %s' % (num_bytes, count) num_bytes /= 1024.0 - return '%3.1f%s' % (num_bytes, 'TB') + return '%3.1f %s' % (num_bytes, 'TB') @enforce_types