This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: tarfile append behavior
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: lars.gustaebel Nosy List: herrwitten, lars.gustaebel
Priority: normal Keywords: patch

Created on 2007-02-05 20:15 by herrwitten, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tarfile.py.diff herrwitten, 2007-02-05 23:33 Fixed Patch
Messages (4)
msg51840 - (view) Author: Witten (herrwitten) Date: 2007-02-05 20:15
The builtin file object has the following behavior for the appending ('a') mode:

    'The file will be created if it doesn't exist when opened for writing or 
    appending'

Currently, the file must already exist and it must not be an empty file.
This patch achieves the file object's behavior with a small one-line addition.

If this patch be used, please add a reference to 'herrwitten' in the log.
msg51841 - (view) Author: Witten (herrwitten) Date: 2007-02-05 23:33
I fixed a bad patch with some personal information and bad path names by using 'svn diff' instead.
File Added: tarfile.py.diff
msg51842 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2007-02-06 18:46
Thank you for the idea. As your patch only implemented appending
to empty files, I added support for creating files if they don't
exist. I added a testcase and adjusted the docs as well.

Checked in the trunk as rev. 53648, so it will appear in 2.6.
msg51843 - (view) Author: Witten (herrwitten) Date: 2007-02-06 22:02
Thanks!

I'll try to be as thorough next time.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44547
2007-02-05 20:15:40herrwittencreate