From 0f12fa2d5a0e460f1022b9c0f52d326ccc0f620f Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Mon, 10 Aug 2020 11:09:58 +0200 Subject: [PATCH] [maintain-github-mirror] Skip abandoned gov files Following the deletion of the foundation-board-repos.yaml file, the script failed as it was expecting it. Remove that file from the scanned list, and make the script more resilient in case other extra files go missing in the future (like user-committee.yaml which should soon be cleaned up). Change-Id: I83cff14f19a829b5e56771442ffb3a0341e82d69 --- playbooks/maintain-github-mirror/github_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/maintain-github-mirror/github_manager.py b/playbooks/maintain-github-mirror/github_manager.py index 27f49207b7..b41b818853 100755 --- a/playbooks/maintain-github-mirror/github_manager.py +++ b/playbooks/maintain-github-mirror/github_manager.py @@ -109,11 +109,13 @@ def list_repos_in_governance(governance, org='openstack'): repos.add(r) extrafiles = ['sigs-repos.yaml', - 'foundation-board-repos.yaml', 'technical-committee-repos.yaml', 'user-committee-repos.yaml'] for extrafile in extrafiles: yaml_filename = os.path.join(governance, 'reference', extrafile) + if not os.path.exists(yaml_filename): + print(f'Skipping {extrafile} as it no longer exists') + continue with open(yaml_filename, 'r') as extra_yaml: for pname, project in yaml.safe_load(extra_yaml).items(): for r in project: