From 2b35fe5a712380681bd6d506916ee6bccb61ac5b Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 16 Apr 2023 17:32:32 +0300 Subject: [PATCH] Fixed for file size --- slpkg/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 2c9cb30e..dd3a8bf8 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -173,9 +173,9 @@ class Utilities: units: list = ['KB', 'MB', 'GB'] for unit in units: - size: float = size / 1000 if size < 1000: - return f'{size:.2f} {unit}' + return f'{size:.0f} {unit}' + size /= 1000 @staticmethod def apply_package_pattern(data: dict, packages: list) -> list: