Fixed string errors for unexpected repo formats
This commit is contained in:
parent
4d8542fba6
commit
cd33a651e2
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ class Git(BaseProject):
|
|||
sections = self._parse_config()
|
||||
for section in sections:
|
||||
if section.split(' ', 1)[0] == 'remote' and 'url' in sections[section]:
|
||||
remote = sections[section]['url'].rsplit(':', 1)[1].rsplit('/', 1)[1].split('.git', 1)[0]
|
||||
remote = sections[section]['url'].rsplit(':', 1)[1]
|
||||
try:
|
||||
remote = remote.rsplit('/' , 1)[1].split('.git' , 1)[0]
|
||||
except:
|
||||
pass
|
||||
tags.append(remote)
|
||||
branch = self._current_branch()
|
||||
if branch is not None:
|
||||
|
|
Loading…
Reference in a new issue