From de8adb24d0a73ed965a1a17dfe6cb0c2bdedc340 Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 7 Aug 2014 22:44:06 -0700 Subject: [PATCH] Fix for AttributeError in SourceUpdateManager --- sickbeard/versionChecker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index b9161ab4..3b172485 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -557,6 +557,10 @@ class GitUpdateManager(UpdateManager): class SourceUpdateManager(UpdateManager): def __init__(self): + self._cur_commit_hash = None + self._newest_commit_hash = None + self._num_commits_behind = 0 + self.github_repo_user = self.get_github_repo_user() self.github_repo = self.get_github_repo() @@ -564,10 +568,6 @@ class SourceUpdateManager(UpdateManager): if sickbeard.BRANCH == '': self.branch = self._find_installed_branch() - self._cur_commit_hash = None - self._newest_commit_hash = None - self._num_commits_behind = 0 - def _find_installed_version(self): installed_path = os.path.dirname(os.path.normpath(os.path.abspath(__file__))) self._cur_commit_hash = self.hash_dir(installed_path) @@ -784,4 +784,4 @@ class SourceUpdateManager(UpdateManager): # split+join normalizes paths on Windows (note the imports) dir_hash[os.path.join(*os.path.split(root))] = self._mktree(f_hash, d_hash) - return dir_hash[path] \ No newline at end of file + return dir_hash[path]