safetpe belt stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 02 Jul 2009 10:21:00 +0200
branchstable
changeset 2230 45d670c00fe1
parent 2229 edf20a9ca376
child 2231 d2052c3ccac7
safetpe belt
web/views/__init__.py
--- a/web/views/__init__.py	Thu Jul 02 10:20:53 2009 +0200
+++ b/web/views/__init__.py	Thu Jul 02 10:21:00 2009 +0200
@@ -114,4 +114,7 @@
             self._generate(tmpfile)
             self.w(open(tmpfile).read())
         finally:
-            os.unlink(tmpfile)
+            try:
+                os.unlink(tmpfile)
+            except Exception, ex:
+                self.warning('cant delete %s: %s', tmpfile, ex)