diff options
author | JF Bastien <jfb@chromium.org> | 2016-01-17 16:06:08 -0800 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2016-01-17 16:06:08 -0800 |
commit | 1f21f5769429f81acfe0b6d316b27c743e000671 (patch) | |
tree | 743231aae28d6a6d776f45c5e2669549a700855e /scripts | |
parent | 705fe594cbabd272a99bfd626be00c2835c94141 (diff) | |
download | binaryen-1f21f5769429f81acfe0b6d316b27c743e000671.tar.gz binaryen-1f21f5769429f81acfe0b6d316b27c743e000671.tar.bz2 binaryen-1f21f5769429f81acfe0b6d316b27c743e000671.zip |
Improve diagnostic for download_tar.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/storage.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/storage.py b/scripts/storage.py index 9cc697f5d..8ae2e2676 100755 --- a/scripts/storage.py +++ b/scripts/storage.py @@ -39,11 +39,15 @@ def download_revision(force_latest): def download_tar(tar_pattern, directory, revision): tar_path = os.path.join(directory, tar_pattern) revision_tar_path = tar_path % revision - if not os.path.isfile(revision_tar_path): + if os.path.isfile(revision_tar_path): + print 'Already have `%s`' % revision_tar_path + else: + print 'Downloading `%s`' % revision_tar_path with open(revision_tar_path, 'w+') as f: f.write(urllib2.urlopen(STORAGE_BASE + tar_pattern % revision).read()) # Remove any previous tarfiles. for older_tar in glob.glob(tar_path % '*'): if older_tar != revision_tar_path: + print 'Removing older tar file `%s`' % older_tar os.remove(older_tar) return revision_tar_path |