From bae7463f41a7ab0cbba9f0cf95b6188f1d8d6244 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Aug 2022 21:31:17 +0200 Subject: [PATCH] Fix my previous commit /o\ --- list_builder.py | 2 +- tools/packaging_v2/convert_app_to_packaging_v2.py | 9 +++++++-- .../convert_v1_manifest_to_v2_for_catalog.py | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/list_builder.py b/list_builder.py index 12422446..2ebd800d 100755 --- a/list_builder.py +++ b/list_builder.py @@ -195,7 +195,7 @@ def build_catalog(): ################################### result_dict_with_manifest_v2 = copy.deepcopy(result_dict) - for app in result_dict_with_manifest_v2: + for app in result_dict_with_manifest_v2.values(): app["manifest"] = convert_v1_manifest_to_v2_for_catalog(app["manifest"]) os.system("mkdir -p ./builds/default/v3/") diff --git a/tools/packaging_v2/convert_app_to_packaging_v2.py b/tools/packaging_v2/convert_app_to_packaging_v2.py index fd663252..21fe7740 100644 --- a/tools/packaging_v2/convert_app_to_packaging_v2.py +++ b/tools/packaging_v2/convert_app_to_packaging_v2.py @@ -37,8 +37,13 @@ def _convert_v1_manifest_to_v2(app_path): "ram.runtime": "50M" } - maintainer = manifest.get("maintainer", {}).get("name") - manifest["maintainers"] = [maintainer] if maintainer else [] + maintainers = manifest.get("maintainer", {}) + if isinstance(maintainers, list): + maintainers = [m['name'] for m in maintainers] + else: + maintainers = [maintainers["name"]] if maintainers.get("name") else [] + + manifest["maintainers"] = maintainers install_questions = manifest["arguments"]["install"] manifest["install"] = {} diff --git a/tools/packaging_v2/convert_v1_manifest_to_v2_for_catalog.py b/tools/packaging_v2/convert_v1_manifest_to_v2_for_catalog.py index 29f24ee5..0130c293 100644 --- a/tools/packaging_v2/convert_v1_manifest_to_v2_for_catalog.py +++ b/tools/packaging_v2/convert_v1_manifest_to_v2_for_catalog.py @@ -24,8 +24,13 @@ def convert_v1_manifest_to_v2_for_catalog(manifest): "ram": {"build": "50M", "runtime": "10M"} } - maintainer = manifest.get("maintainer", {}).get("name") - manifest["maintainers"] = [maintainer] if maintainer else [] + maintainers = manifest.get("maintainer", {}) + if isinstance(maintainers, list): + maintainers = [m['name'] for m in maintainers] + else: + maintainers = [maintainers["name"]] if maintainers.get("name") else [] + + manifest["maintainers"] = maintainers install_questions = manifest["arguments"]["install"]