Merge pull request #14 from fermionic/20130105-smarty3
change tpl conversion script to support Python 2.4
This commit is contained in:
commit
0cda9601c6
@ -189,10 +189,14 @@ for a_file in files:
|
|||||||
filename = os.path.join(path,a_file)
|
filename = os.path.join(path,a_file)
|
||||||
ext = a_file.split('.')[-1]
|
ext = a_file.split('.')[-1]
|
||||||
if os.path.isfile(filename) and ext == 'tpl':
|
if os.path.isfile(filename) and ext == 'tpl':
|
||||||
with open(filename, 'r') as f:
|
f = open(filename, 'r')
|
||||||
|
|
||||||
newfilename = os.path.join(outpath,a_file)
|
newfilename = os.path.join(outpath,a_file)
|
||||||
with open(newfilename, 'w') as outf:
|
outf = open(newfilename, 'w')
|
||||||
|
|
||||||
print "Converting " + filename + " to " + newfilename
|
print "Converting " + filename + " to " + newfilename
|
||||||
convert(f, outf, php_tpl)
|
convert(f, outf, php_tpl)
|
||||||
|
|
||||||
|
outf.close()
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user