diff options
author | friendica <info@friendica.com> | 2013-01-06 21:58:50 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-06 21:58:50 -0800 |
commit | 0cda9601c6805aab7daa9b6380f9150bccd46fc0 (patch) | |
tree | f5f00e3edff39b1251a4b748f9efc5cded4905da /mods/friendica-to-smarty-tpl.py | |
parent | 3fc6df1000ea064e8f5ee6e066a79460d90b25cb (diff) | |
parent | dd445c9b6fbe180fb7bef5df89abb7fb6e2ef6e8 (diff) | |
download | volse-hubzilla-0cda9601c6805aab7daa9b6380f9150bccd46fc0.tar.gz volse-hubzilla-0cda9601c6805aab7daa9b6380f9150bccd46fc0.tar.bz2 volse-hubzilla-0cda9601c6805aab7daa9b6380f9150bccd46fc0.zip |
Merge pull request #14 from fermionic/20130105-smarty3
change tpl conversion script to support Python 2.4
Diffstat (limited to 'mods/friendica-to-smarty-tpl.py')
-rwxr-xr-x | mods/friendica-to-smarty-tpl.py | 14 |
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() |