changeset 484:a04fc9c5d76c

SvgEditor: changed file call to open and close
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 31 Jan 2010 22:56:19 +0100
parents 7406f531c279
children 8c21d7a8d4ec
files data/plugin/action/SvgEditor.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SvgEditor.py	Sun Jan 31 21:52:14 2010 +0100
+++ b/data/plugin/action/SvgEditor.py	Sun Jan 31 22:56:19 2010 +0100
@@ -90,7 +90,9 @@
             attach_dir = AttachFile.getAttachDir(request, pagename, create=1)
             # save file
             fpath = AttachFile.getFilename(request, pagename, target).encode(config.charset)
-            file(fpath, 'w').write(filecontent.decode('base_64'))
+            f = open(fpath, 'w')
+            f.write(filecontent.decode('base_64'))
+            f.close()
 
         url = Page(request, pagename).url(request)
         request.http_redirect(url)