From 92c80f3b29c4d8694deb72779fa65f8de0ff8965 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Mon, 15 Feb 2016 12:18:15 -0800 Subject: fix artifacts script --- scripts/artifacts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/artifacts.py b/scripts/artifacts.py index 48ae2fb..4b821cf 100644 --- a/scripts/artifacts.py +++ b/scripts/artifacts.py @@ -9,7 +9,7 @@ import subprocess def get_json(url): - return json.load(io.TextIOWrapper(urlopen(url), encoding='utf-8')) + return json.loads(urlopen(url).read().decode('utf-8')) def download_file(src_url, dest_path): @@ -36,7 +36,7 @@ def download_github_artifacts(): release = get_json( 'https://api.github.com/repos/simplejson/simplejson/releases/latest') for asset in release['assets']: - download_file(asset['url'], 'dist/{name}'.format(**asset)) + download_file(asset['browser_download_url'], 'dist/{name}'.format(**asset)) def main(): -- cgit v1.2.1