From 326d0204c0c437cce66c815f92ef9722ad716d81 Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 28 Jul 2014 17:32:12 -0700 Subject: [PATCH] Fixes issues with inital setting of branch version on startup first run --- sickbeard/versionChecker.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index 7cdff738..dcdb387e 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -279,7 +279,10 @@ class GitUpdateManager(UpdateManager): self._git_path = self._find_working_git() self.github_repo_user = self.get_github_repo_user() self.github_repo = self.get_github_repo() - self.branch = sickbeard.BRANCH or self._find_installed_branch() + + self.branch = sickbeard.BRANCH + if not (sickbeard.BRANCH or sickbeard.BRANCH == ''): + self.branch = self._find_installed_branch() self._cur_commit_hash = None self._newest_commit_hash = None @@ -534,7 +537,10 @@ class SourceUpdateManager(UpdateManager): def __init__(self): self.github_repo_user = self.get_github_repo_user() self.github_repo = self.get_github_repo() - self.branch = sickbeard.BRANCH or self._find_installed_branch() + + self.branch = sickbeard.BRANCH + if not (sickbeard.BRANCH or sickbeard.BRANCH == ''): + self.branch = self._find_installed_branch() self._cur_commit_hash = None self._newest_commit_hash = None