mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
change tpl conversion script to support Python 2.4
This commit is contained in:
parent
c94c500cdc
commit
dd445c9b6f
1 changed files with 9 additions and 5 deletions
|
@ -189,10 +189,14 @@ for a_file in files:
|
|||
filename = os.path.join(path,a_file)
|
||||
ext = a_file.split('.')[-1]
|
||||
if os.path.isfile(filename) and ext == 'tpl':
|
||||
with open(filename, 'r') as f:
|
||||
newfilename = os.path.join(outpath,a_file)
|
||||
with open(newfilename, 'w') as outf:
|
||||
print "Converting " + filename + " to " + newfilename
|
||||
convert(f, outf, php_tpl)
|
||||
f = open(filename, 'r')
|
||||
|
||||
newfilename = os.path.join(outpath,a_file)
|
||||
outf = open(newfilename, 'w')
|
||||
|
||||
print "Converting " + filename + " to " + newfilename
|
||||
convert(f, outf, php_tpl)
|
||||
|
||||
outf.close()
|
||||
f.close()
|
||||
|
||||
|
|
Loading…
Reference in a new issue