mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Handle human size option for apps size as well
This commit is contained in:
parent
15cfe22b3c
commit
7de5251af6
1 changed files with 4 additions and 1 deletions
|
@ -2272,13 +2272,16 @@ def backup_info(name, with_details=False, human_readable=False):
|
|||
if "hooks" in info.keys():
|
||||
system_key = "hooks"
|
||||
|
||||
|
||||
if "size_details" in info.keys():
|
||||
for name, key_info in info["apps"].items():
|
||||
if name in info["size_details"]["apps"].keys():
|
||||
key_info["size"] = info["size_details"]["apps"][name]
|
||||
if human_readable:
|
||||
key_info["size"] = binary_to_human(key_info["size"]) + 'B'
|
||||
else:
|
||||
key_info["size"] = 0
|
||||
if human_readable:
|
||||
key_info["size"] = "?"
|
||||
|
||||
result["apps"] = info["apps"]
|
||||
result["system"] = info[system_key]
|
||||
|
|
Loading…
Add table
Reference in a new issue