From bfef7006b97fee22535d2f63db41ee9bec038065 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 --- fetch_remotes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fetch_remotes.py b/fetch_remotes.py index 4dda133..6f8ab8b 100755 --- a/fetch_remotes.py +++ b/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']