Fix a weird issue that may arise during test, strangely unspotted so far

This commit is contained in:
Alexandre Aubin 2020-09-09 00:06:23 +02:00
parent bfa0f304aa
commit 7483d04f54

View file

@ -91,7 +91,7 @@ def app_catalog(full=False, with_categories=False):
"level": infos["level"],
}
else:
infos["manifest"]["arguments"] = _set_default_ask_questions(infos["manifest"]["arguments"])
infos["manifest"]["arguments"] = _set_default_ask_questions(infos["manifest"].get("arguments", {}))
# Trim info for categories if not using --full
for category in catalog["categories"]:
@ -170,7 +170,7 @@ def app_info(app, full=False):
return ret
ret["manifest"] = local_manifest
ret["manifest"]["arguments"] = _set_default_ask_questions(ret["manifest"]["arguments"])
ret["manifest"]["arguments"] = _set_default_ask_questions(ret["manifest"].get("arguments", {}))
ret['settings'] = settings
absolute_app_name, _ = _parse_app_instance_name(app)
@ -2130,12 +2130,6 @@ def _get_manifest_of_app(path):
manifest = manifest_toml.copy()
if "arguments" not in manifest:
return manifest
if "install" not in manifest["arguments"]:
return manifest
install_arguments = []
for name, values in manifest_toml.get("arguments", {}).get("install", {}).items():
args = values.copy()
@ -2150,7 +2144,7 @@ def _get_manifest_of_app(path):
else:
raise YunohostError("There doesn't seem to be any manifest file in %s ... It looks like an app was not correctly installed/removed." % path, raw_msg=True)
manifest["arguments"] = _set_default_ask_questions(manifest["arguments"])
manifest["arguments"] = _set_default_ask_questions(manifest.get("arguments", {}))
return manifest