fix print statements in a couple of scripts
This commit is contained in:
1 parent
623f3b9947
commit
521d5bce97
3 files changed
+7
-7
No files matched your search
@@ -31,7 +31,7 @@ hashes = {}
|
|||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
if request.tickets_db:
|
if request.tickets_db:
|
||||||
print "You're storing tickets yet in database"
|
print("You're storing tickets yet in database")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
for file in os.listdir(errors_path):
|
for file in os.listdir(errors_path):
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import json
|
|||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
print "missing module 'Requests', aborting."
|
print("missing module 'Requests', aborting.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
from gluon import URL
|
from gluon import URL
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ def zip_static(filelist=[]):
|
|||||||
extension = os.path.splitext(fi)
|
extension = os.path.splitext(fi)
|
||||||
extension = len(extension) > 1 and extension[1] or None
|
extension = len(extension) > 1 and extension[1] or None
|
||||||
if not extension or extension not in ALLOWED_EXTS:
|
if not extension or extension not in ALLOWED_EXTS:
|
||||||
print 'skipping %s' % os.path.basename(fi)
|
print('skipping %s' % os.path.basename(fi))
|
||||||
continue
|
continue
|
||||||
fstats = os.stat(fi)
|
fstats = os.stat(fi)
|
||||||
atime, mtime = fstats.st_atime, fstats.st_mtime
|
atime, mtime = fstats.st_atime, fstats.st_mtime
|
||||||
@@ -23,10 +23,10 @@ def zip_static(filelist=[]):
|
|||||||
zstats = os.stat(gfi)
|
zstats = os.stat(gfi)
|
||||||
zatime, zmtime = zstats.st_atime, zstats.st_mtime
|
zatime, zmtime = zstats.st_atime, zstats.st_mtime
|
||||||
if zatime == atime and zmtime == 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
|
continue
|
||||||
print 'gzipping %s to %s' % (
|
print('gzipping %s to %s' % (
|
||||||
os.path.basename(fi), os.path.basename(gfi))
|
os.path.basename(fi), os.path.basename(gfi)))
|
||||||
f_in = open(fi, 'rb')
|
f_in = open(fi, 'rb')
|
||||||
f_out = gzip.open(gfi, 'wb')
|
f_out = gzip.open(gfi, 'wb')
|
||||||
f_out.writelines(f_in)
|
f_out.writelines(f_in)
|
||||||
@@ -36,7 +36,7 @@ def zip_static(filelist=[]):
|
|||||||
saved = fstats.st_size - os.stat(gfi).st_size
|
saved = fstats.st_size - os.stat(gfi).st_size
|
||||||
tsave += saved
|
tsave += saved
|
||||||
|
|
||||||
print 'saved %s KB' % (int(tsave) / 1000.0)
|
print('saved %s KB' % (int(tsave) / 1000.0))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
ALLOWED_EXTS = ['.css', '.js']
|
ALLOWED_EXTS = ['.css', '.js']
|
||||||
|
|||||||
Reference in new issue
Block a user