From 6e9b9bf5a39d45ce542f8b7c8cc7500bc2eb316b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Aug 2022 21:58:56 +0200 Subject: [PATCH] manifestv2: fix v1/v2 conversion for maintainers --- manifestv2_app_ynh/convert_to_packaging_v2.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manifestv2_app_ynh/convert_to_packaging_v2.py b/manifestv2_app_ynh/convert_to_packaging_v2.py index 5603955..19a0327 100644 --- a/manifestv2_app_ynh/convert_to_packaging_v2.py +++ b/manifestv2_app_ynh/convert_to_packaging_v2.py @@ -36,8 +36,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"] = {}