summaryrefslogtreecommitdiff
path: root/scripts/storage.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/storage.py')
-rwxr-xr-xscripts/storage.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/storage.py b/scripts/storage.py
index 9dad45e54..89e5f6107 100755
--- a/scripts/storage.py
+++ b/scripts/storage.py
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import print_function
+
import glob
import json
import os
@@ -40,14 +42,14 @@ def download_tar(tar_pattern, directory, revision):
tar_path = os.path.join(directory, tar_pattern)
revision_tar_path = tar_path % revision
if os.path.isfile(revision_tar_path):
- print 'Already have `%s`' % revision_tar_path
+ print('Already have `%s`' % revision_tar_path)
else:
- print 'Downloading `%s`' % revision_tar_path
+ 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
+ print('Removing older tar file `%s`' % older_tar)
os.remove(older_tar)
return revision_tar_path