mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 00:32:58 -07:00
Check for failed to retrieve releases from GitHub
This commit is contained in:
parent
19969a8b1f
commit
80b318b45c
1 changed files with 4 additions and 0 deletions
|
@ -178,6 +178,10 @@ def checkGithub(auto_update=False):
|
||||||
url = 'https://api.github.com/repos/%s/plexpy/releases' % plexpy.CONFIG.GIT_USER
|
url = 'https://api.github.com/repos/%s/plexpy/releases' % plexpy.CONFIG.GIT_USER
|
||||||
releases = request.request_json(url, timeout=20, whitelist_status_code=404, validator=lambda x: type(x) == list)
|
releases = request.request_json(url, timeout=20, whitelist_status_code=404, validator=lambda x: type(x) == list)
|
||||||
|
|
||||||
|
if releases is None:
|
||||||
|
logger.warn('Could not get releases from GitHub.')
|
||||||
|
return plexpy.LATEST_VERSION
|
||||||
|
|
||||||
if plexpy.CONFIG.GIT_BRANCH == 'master':
|
if plexpy.CONFIG.GIT_BRANCH == 'master':
|
||||||
release = next((r for r in releases if not r['prerelease']), releases[0])
|
release = next((r for r in releases if not r['prerelease']), releases[0])
|
||||||
elif plexpy.CONFIG.GIT_BRANCH == 'beta':
|
elif plexpy.CONFIG.GIT_BRANCH == 'beta':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue