mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
code quality
This commit is contained in:
parent
7d84230aaf
commit
21c954c422
2 changed files with 3 additions and 2 deletions
|
@ -90,9 +90,9 @@ class PandoraBox:
|
|||
""" Convert size to human readble string """
|
||||
for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
|
||||
if size < 1024.0:
|
||||
break
|
||||
return f"{size:.{decimal_places}f}{unit}"
|
||||
size /= 1024.0
|
||||
return f"{size:.{decimal_places}f}{unit}"
|
||||
return None
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# Image Screen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue