Lars Gustäbel <l...@gustaebel.de> added the comment: I found an issue that needs to be addressed: if there is an error while the TarFile object is opened for writing, we cannot simply call TarFile.close() in the __exit__() method. close() would try to finalize the archive, i.e. write two zero end-of-archive blocks and a number of padding blocks.
I changed __exit__() to call close() only if everything went fine. If there was an exception only the most basic cleanup is done. I added more tests and adapted the docs. ---------- Added file: http://bugs.python.org/file16401/issue7232.9.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7232> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com