From 32228f3c5b9eec4c9ec8f575c3948efe7013c1d8 Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Sun, 17 Jan 2016 14:33:04 -0800 Subject: Remove older tarfiles properly. --- scripts/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/storage.py') diff --git a/scripts/storage.py b/scripts/storage.py index b15c76855..09a777135 100755 --- a/scripts/storage.py +++ b/scripts/storage.py @@ -43,7 +43,7 @@ def download_tar(tar_pattern, directory, revision): 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): + for older_tar in glob.glob(tar_path % '*'): if older_tar != revision_tar_path: os.path.remove(older_tar) return revision_tar_path -- cgit v1.2.3