Fix python scripts for python 3 (print now a function rather than a keyword)

This commit is contained in:
Martin Moene 2014-03-08 11:31:38 +01:00
parent 91ea20c4cc
commit 77c9edfcdb
3 changed files with 20 additions and 14 deletions

View file

@ -1,3 +1,5 @@
from __future__ import print_function
import os
import sys
import shutil
@ -18,12 +20,12 @@ def approveFile( approvedFile, unapprovedFile ):
if os.path.exists( approvedFile ):
os.remove( approvedFile )
os.rename( unapprovedFile, approvedFile )
print "approved " + justFilename
print( "approved " + justFilename )
else:
print "approval file " + justFilename + " does not exist"
print( "approval file " + justFilename + " does not exist" )
if len(files) > 0:
for unapprovedFile in files:
approveFile( unapprovedFile.replace( "unapproved.txt", "approved.txt" ), unapprovedFile )
else:
print "no files to approve"
print( "no files to approve" )