The line
rest.replace('.git/', '/')
was added to accommodate weird folks who run teuthology-suite
with an option like this:
--suite-repo https://github.com/ceph/ceph.git/
but they might just as well give the option like this:
--suite-repo https://github.com/ceph/ceph.git
Signed-off-by: Nathan Cutler <ncutler@suse.com>
import logging
import os
import json
+import re
import uuid
from ceph_manager import CephManager
if git_url.startswith('https://github.com/'):
# git archive doesn't like https:// URLs, which we use with github.
rest = git_url.split('https://github.com/', 1)[1]
- rest.replace('.git/', '/') # no .git suffix
+ rest = re.sub(r'\.git/?$', '', rest).strip() # no .git suffix
ctx.cluster.run(
args=[
'curl', '--silent',