From 0d5361bb497617424233897a1f612e4c920d953b Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 14 Nov 2012 17:48:55 -0800 Subject: [PATCH] Fix manage_projects.py group regex and str format. manage_projects.py was unable to find groups in the ACL files because it was looking for lines that began with tabs but we normalized to lines beginning with 8 spaces. Also the git clone command string formatting was not correct. Change-Id: Ib65d7ad0ca3861d61d7557be72a7c6d6d6e21265 Reviewed-on: https://review.openstack.org/16144 Reviewed-by: Jeremy Stanley Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/gerrit/files/scripts/manage_projects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gerrit/files/scripts/manage_projects.py b/modules/gerrit/files/scripts/manage_projects.py index 4ef8a70fef..6d9bf8eeef 100755 --- a/modules/gerrit/files/scripts/manage_projects.py +++ b/modules/gerrit/files/scripts/manage_projects.py @@ -162,7 +162,7 @@ def create_groups_file(project, gerrit, repo_path): group_file = os.path.join(repo_path, "groups") uuids = {} for line in open(acl_config, 'r'): - r = re.match(r'^\t.*group\s(.*)$', line) + r = re.match(r'^\s+.*group\s+(.*)$', line) if r: group = r.group(1) if group in uuids.keys(): @@ -278,7 +278,7 @@ try: try: repo_path = os.path.join(tmpdir, 'repo') if upstream: - run_command("git clone %(upstream)s %(repo_path)" % + run_command("git clone %(upstream)s %(repo_path)s" % dict(upstream=upstream, repo_path=repo_path)) else: run_command("git init %s" % repo_path)