From 99a160120d213e1af1f6b6439670ba035e697aac Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 14 Nov 2012 09:11:09 -0800 Subject: [PATCH] Fix fetch remotes script post projects.yaml update The format of the projects.yaml file has been updated and fetch_remotes.py could not parse it. Correct this by making fetch_remotes.py aware of the format changes. Change-Id: Ic0680d02c0e9ce31aae805ac2495957f106acb0a Reviewed-on: https://review.openstack.org/16098 Reviewed-by: James E. Blair Reviewed-by: Paul Belanger Approved: Monty Taylor Reviewed-by: Monty Taylor Tested-by: Jenkins --- modules/gerrit/files/scripts/fetch_remotes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/gerrit/files/scripts/fetch_remotes.py b/modules/gerrit/files/scripts/fetch_remotes.py index 4dda133f3d..6f8ab8b4ed 100755 --- a/modules/gerrit/files/scripts/fetch_remotes.py +++ b/modules/gerrit/files/scripts/fetch_remotes.py @@ -16,6 +16,12 @@ # Fetch remotes reads a project config file called projects.yaml # It should look like: +# - homepage: http://openstack.org +# team-id: 153703 +# has-wiki: False +# has-issues: False +# has-downloads: False +# --- # - project: PROJECT_NAME # options: # - remote: https://gerrit.googlesource.com/gerrit @@ -50,7 +56,7 @@ REPO_ROOT = os.environ.get('REPO_ROOT', PROJECTS_YAML = os.environ.get('PROJECTS_YAML', '/home/gerrit2/projects.yaml') -config = yaml.load(open(PROJECTS_YAML)) +(defaults, config) = [config for config in yaml.load_all(open(PROJECTS_YAML))] for section in config: project = section['project']