mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Fixed for file size
This commit is contained in:
parent
9a8c6cca4c
commit
2b35fe5a71
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue