Make sure to properly close form multiparts on __exit__.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 27 Aug 2012 05:49:25 +0000 (07:49 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 27 Aug 2012 05:49:25 +0000 (07:49 +0200)
wrw/form.py

index 1f0e530..9f1e6d4 100644 (file)
@@ -111,6 +111,7 @@ class formpart(object):
         return self
 
     def __exit__(self, *excinfo):
+        self.close()
         return False
 
     def parsehead(self):