Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r76446 - python/branches/release31-maint

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Nov 22, 2009, 12:20 PM

Post #1 of 1 (128 views)
Permalink
r76446 - python/branches/release31-maint

Author: lars.gustaebel
Date: Sun Nov 22 20:02:36 2009
New Revision: 76446

Log:
Blocked revisions 76444 via svnmerge

................
r76444 | lars.gustaebel | 2009-11-22 19:48:49 +0100 (Sun, 22 Nov 2009) | 30 lines

Merged revisions 76443 via svnmerge from
svn+ssh://pythondev [at] svn/python/trunk

........
r76443 | lars.gustaebel | 2009-11-22 19:30:53 +0100 (Sun, 22 Nov 2009) | 24 lines

Issue #6123: Fix opening empty archives and files.

(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)

The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)

In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.

The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
........
................


Modified:
python/branches/release31-maint/ (props changed)
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.