[ python-Bugs-1194181 ] bz2.BZ2File doesn't handle modes correctly
SourceForge.net
noreply at sourceforge.net
Fri Jun 3 20:23:59 CEST 2005
Bugs item #1194181, was opened at 2005-05-02 22:39
Message generated for change (Comment added) made by etrepum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1194181&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 8
Submitted By: Bob Ippolito (etrepum)
Assigned to: Raymond Hettinger (rhettinger)
Summary: bz2.BZ2File doesn't handle modes correctly
Initial Comment:
I've noticed that if I specify a file mode of 'U' to bz2.BZ2File, it will
erase my file. That's bad. Specifying 'rU' works as expected.
Basically, it assumes that you want a writable file unless it sees an
'r' in the mode, or no mode is given. Ugh.
I've attached a patch that fixes this on CVS HEAD, it looks like it
should apply cleanly to 2.4 as well. This is a backport candidate if
I've ever seen one.
----------------------------------------------------------------------
>Comment By: Bob Ippolito (etrepum)
Date: 2005-06-03 14:23
Message:
Logged In: YES
user_id=139309
It should still be OK to check in.
----------------------------------------------------------------------
Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-03 14:16
Message:
Logged In: YES
user_id=1188172
Okay to check in?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1194181&group_id=5470
More information about the Python-bugs-list
mailing list