More tweaks for openmandriva located in github

This commit is contained in:
Denis Silakov 2018-10-23 09:11:47 +03:00
parent 9c8eb76cba
commit c0de25053d

View file

@ -45,9 +45,11 @@ def get_project_name(path=None):
e["LC_ALL"] = "C"
output, ret_code = execute_command(['git', 'remote', 'show', 'origin', '-n'], cwd=path, env=e)
m = re.compile("^.*Fetch URL:\s+.*abf.*[:/]([^/]+)/([^/]+)[.]git$",re.MULTILINE).search(output)
m = re.compile("^.*Fetch URL:\s+.*[:/]([^/]+)/([^/]+)[.]git$",re.MULTILINE).search(output)
if m:
owner_name, project_name = m.groups()
if "OpenMandriva" in owner_name:
return ("openmandriva", project_name)
return (owner_name, project_name)
return (None, None)
except ReturnCodeNotZero: