in update_releases.py [0:0]
def get_release_data(everything):
last_modified = None
if everything:
resp = requests.get(RELEASES_URL, {'all': 'true'}, timeout=60)
else:
headers = get_request_headers()
resp = requests.get(RELEASES_URL, headers=headers, timeout=30)
resp.raise_for_status()
if resp.status_code == 304:
# no updates, nothing modified since last_modified
return None, None
if 'last-modified' in resp.headers:
last_modified = resp.headers['last-modified']
return resp.json(), last_modified