Fixed string errors for unexpected repo formats

This commit is contained in:
jaspertandy 2013-07-22 11:41:26 +01:00
parent 4d8542fba6
commit cd33a651e2

View file

@ -43,7 +43,11 @@ class Git(BaseProject):
sections = self._parse_config() sections = self._parse_config()
for section in sections: for section in sections:
if section.split(' ', 1)[0] == 'remote' and 'url' in sections[section]: 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) tags.append(remote)
branch = self._current_branch() branch = self._current_branch()
if branch is not None: if branch is not None: