Fixed for file size

This commit is contained in:
Dimitris Zlatanidis 2023-04-16 17:32:32 +03:00
parent 9a8c6cca4c
commit 2b35fe5a71

View file

@ -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: