Run through pyfa.io for update checks (allows us to log version usage and provide more flexibility going forward). Falls back to simple github request
This commit is contained in:
@@ -48,7 +48,11 @@ class CheckUpdateThread(threading.Thread):
|
||||
network = Network.getInstance()
|
||||
|
||||
try:
|
||||
response = network.request('https://api.github.com/repos/pyfa-org/Pyfa/releases', network.UPDATE)
|
||||
try:
|
||||
response = network.request('https://www.pyfa.io/update_check?pyfa_version={}'.format(config.version), network.UPDATE)
|
||||
except Exception as e:
|
||||
response = network.request('https://api.github.com/repos/pyfa-org/Pyfa/releases', network.UPDATE)
|
||||
|
||||
jsonResponse = response.json()
|
||||
jsonResponse.sort(
|
||||
key=lambda x: calendar.timegm(dateutil.parser.parse(x['published_at']).utctimetuple()),
|
||||
|
||||
Reference in New Issue
Block a user