Commit 94514efb authored by echel0n's avatar echel0n

Resolved issue with version updater and branch_ref NoneType

parent 6f4fdcb7
......@@ -412,7 +412,9 @@ class GitUpdateManager(UpdateManager):
def current_branch(self):
branch_ref, __, exit_status = self._git_cmd(self._git_path, 'symbolic-ref -q HEAD')
return ("", branch_ref.strip().replace('refs/heads/', '', 1))[exit_status == 0 and branch_ref is not None]
if exit_status == 0 and branch_ref is not None:
return branch_ref.strip().replace('refs/heads/', '', 1)
return ""
def remote_branches(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment