0dece759 by Marcos Cano

remove any additional print

1 parent 8b906f97
......@@ -63,12 +63,12 @@ def engine(ifile,ofile,vars):
matches = template.pattern.findall(template.template)
if len(matches):
print '[ MATCHES ] - ', matches
#print '[ MATCHES ] - ', matches
outputText = template.safe_substitute(vars)
print "[ TEMPLATING ] - %s "%ifile
#print "[ TEMPLATING ] - %s "%ifile
if printit:
print "AFTER TEMPLATE:"
#print "AFTER TEMPLATE:"
#print outputText
print outputText.encode('ascii', 'ignore')
else:
......@@ -93,17 +93,16 @@ def main(argv):
sys.exit(2)
global debug, vars, ifile, ofile,printit, recursive
print options
for opt, arg in options:
if opt in ('-v','--vars','--v'):
if os.path.isfile(arg):
with open(arg) as data_file:
print "using file"
#print "using file"
vars = json.load(data_file)
else:
print "using environment"
#print "using environment"
vars=os.environ
elif opt in ('-r','--r'):
......@@ -142,7 +141,6 @@ def main(argv):
if recursive :
print folder
count=0
for path, dirs, files in os.walk(folder):
for filename in files:
......@@ -153,7 +151,7 @@ def main(argv):
count+=1
else:
print "file %s does not exists"%fullpath
print "successfully templated %s files"%str(count)
#print "successfully templated %s files"%str(count)
elif ifile != '':
engine(ifile, ofile, vars )
......