1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Fix for issue #933, resolves github comparison errors during update checks

This commit is contained in:
echel0n 2014-11-22 10:46:33 -08:00
parent ed4c99b6f0
commit e0f78603cb

View File

@ -618,12 +618,8 @@ class SourceUpdateManager(UpdateManager):
# try to get newest commit hash and commits behind directly by comparing branch and current commit # try to get newest commit hash and commits behind directly by comparing branch and current commit
if self._cur_commit_hash: if self._cur_commit_hash:
branch_compared = sickbeard.gh.compare(base=self.branch, head=self._cur_commit_hash) branch_compared = sickbeard.gh.compare(base=self.branch, head=self._cur_commit_hash)
self._newest_commit_hash = branch_compared.base_commit.sha
if 'base_commit' in branch_compared: self._num_commits_behind = branch_compared.behind_by
self._newest_commit_hash = branch_compared['base_commit']['sha']
if 'behind_by' in branch_compared:
self._num_commits_behind = int(branch_compared['behind_by'])
# fall back and iterate over last 100 (items per page in gh_api) commits # fall back and iterate over last 100 (items per page in gh_api) commits
if not self._newest_commit_hash: if not self._newest_commit_hash: