Private GIT

Skip to content
Snippets Groups Projects
Commit 7310f869 authored by Nic Wolfe's avatar Nic Wolfe
Browse files

Fix the version checker to tolerate errors better

parent d0ccdd70
No related branches found
No related tags found
No related merge requests found
......@@ -286,7 +286,14 @@ class GitUpdateManager(UpdateManager):
def _find_git_branch(self):
return self._run_git('symbolic-ref -q HEAD')[0].strip().replace('refs/heads/', '', 1) or 'master'
branch_info = self._run_git('symbolic-ref -q HEAD')
if not branch_info:
return 'master'
branch = branch_info[0].strip().replace('refs/heads/', '', 1)
return branch or 'master'
def _check_github_for_update(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment