aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Prezkuta <fermion@gmx.com>2013-01-06 22:40:32 -0700
committerZach Prezkuta <fermion@gmx.com>2013-01-06 22:40:32 -0700
commitdd445c9b6fbe180fb7bef5df89abb7fb6e2ef6e8 (patch)
treefdffd96e378eb3bc18df2c9b877be9a775272cca
parentc94c500cdcfdc94427d7f7e2509e9af9ee0d78ae (diff)
downloadvolse-hubzilla-dd445c9b6fbe180fb7bef5df89abb7fb6e2ef6e8.tar.gz
volse-hubzilla-dd445c9b6fbe180fb7bef5df89abb7fb6e2ef6e8.tar.bz2
volse-hubzilla-dd445c9b6fbe180fb7bef5df89abb7fb6e2ef6e8.zip
change tpl conversion script to support Python 2.4
-rwxr-xr-xmods/friendica-to-smarty-tpl.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/mods/friendica-to-smarty-tpl.py b/mods/friendica-to-smarty-tpl.py
index b82aa912a..ff1a102a4 100755
--- a/mods/friendica-to-smarty-tpl.py
+++ b/mods/friendica-to-smarty-tpl.py
@@ -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()