Author: Matti Picus <[email protected]>
Branch: win32-stdlib
Changeset: r54284:a1087214df4c
Date: 2012-04-11 13:42 +0300
http://bitbucket.org/pypy/pypy/changeset/a1087214df4c/
Log: add __del__, is it ever called?
diff --git a/lib-python/modified-2.7/mailbox.py
b/lib-python/modified-2.7/mailbox.py
--- a/lib-python/modified-2.7/mailbox.py
+++ b/lib-python/modified-2.7/mailbox.py
@@ -1818,6 +1818,10 @@
else:
self._pos = pos
+ def __del__(self):
+ if hasattr(self,'_file'):
+ self.close()
+
def read(self, size=None):
"""Read bytes."""
return self._read(size, self._file.read)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit