diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index 4d1f6894f7871fd2fa307a058bdb24c8cea489dc..279f42b8d7ce7a20a03ad12c8e9509cb7e92cee4 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -759,9 +759,14 @@ 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) - self._newest_commit_hash = branch_compared.base_commit.sha - self._num_commits_behind = branch_compared.behind_by + try: + branch_compared = sickbeard.gh.compare(base=self.branch, head=self._cur_commit_hash) + self._newest_commit_hash = branch_compared.base_commit.sha + self._num_commits_behind = branch_compared.behind_by + except Exception: # UnknownObjectException + self._newest_commit_hash = "" + self._num_commits_behind = 0 + self._cur_commit_hash = "" # fall back and iterate over last 100 (items per page in gh_api) commits if not self._newest_commit_hash: