1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 03:22:22 -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
if self._cur_commit_hash:
branch_compared = sickbeard.gh.compare(base=self.branch, head=self._cur_commit_hash)
if 'base_commit' in branch_compared:
self._newest_commit_hash = branch_compared['base_commit']['sha']
if 'behind_by' in branch_compared:
self._num_commits_behind = int(branch_compared['behind_by'])
self._newest_commit_hash = branch_compared.base_commit.sha
self._num_commits_behind = branch_compared.behind_by
# fall back and iterate over last 100 (items per page in gh_api) commits
if not self._newest_commit_hash: