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 <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
diff --git a/manage_projects.py b/manage_projects.py
index 4ef8a70..6d9bf8e 100755
--- a/manage_projects.py
+++ b/manage_projects.py
@@ -162,7 +162,7 @@
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:
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)