From 521d5bce97a1ed706057ad67663fc7e3d63a1798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Tue, 6 Feb 2018 19:48:11 +0000 Subject: [PATCH] fix print statements in a couple of scripts --- scripts/tickets2db.py | 2 +- scripts/tickets2slack.py | 2 +- scripts/zip_static_files.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/tickets2db.py b/scripts/tickets2db.py index ecb1b4cd..da499483 100755 --- a/scripts/tickets2db.py +++ b/scripts/tickets2db.py @@ -31,7 +31,7 @@ hashes = {} while 1: if request.tickets_db: - print "You're storing tickets yet in database" + print("You're storing tickets yet in database") sys.exit(1) for file in os.listdir(errors_path): diff --git a/scripts/tickets2slack.py b/scripts/tickets2slack.py index 692dce2b..c9d181bb 100755 --- a/scripts/tickets2slack.py +++ b/scripts/tickets2slack.py @@ -22,7 +22,7 @@ import json try: import requests except ImportError as e: - print "missing module 'Requests', aborting." + print("missing module 'Requests', aborting.") sys.exit(1) from gluon import URL diff --git a/scripts/zip_static_files.py b/scripts/zip_static_files.py index 57054e5b..170ef12a 100644 --- a/scripts/zip_static_files.py +++ b/scripts/zip_static_files.py @@ -14,7 +14,7 @@ def zip_static(filelist=[]): extension = os.path.splitext(fi) extension = len(extension) > 1 and extension[1] or None if not extension or extension not in ALLOWED_EXTS: - print 'skipping %s' % os.path.basename(fi) + print('skipping %s' % os.path.basename(fi)) continue fstats = os.stat(fi) atime, mtime = fstats.st_atime, fstats.st_mtime @@ -23,10 +23,10 @@ def zip_static(filelist=[]): zstats = os.stat(gfi) zatime, zmtime = zstats.st_atime, zstats.st_mtime if zatime == atime and zmtime == mtime: - print 'skipping %s, already gzipped to the latest version' % os.path.basename(fi) + print('skipping %s, already gzipped to the latest version' % os.path.basename(fi)) continue - print 'gzipping %s to %s' % ( - os.path.basename(fi), os.path.basename(gfi)) + print('gzipping %s to %s' % ( + os.path.basename(fi), os.path.basename(gfi))) f_in = open(fi, 'rb') f_out = gzip.open(gfi, 'wb') f_out.writelines(f_in) @@ -36,7 +36,7 @@ def zip_static(filelist=[]): saved = fstats.st_size - os.stat(gfi).st_size tsave += saved - print 'saved %s KB' % (int(tsave) / 1000.0) + print('saved %s KB' % (int(tsave) / 1000.0)) if __name__ == '__main__': ALLOWED_EXTS = ['.css', '.js']