]> granicus.if.org Git - python/commitdiff
Part of SF patch #1484695. This removes dead code. The chksum was
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 10 Jul 2006 00:23:17 +0000 (00:23 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 10 Jul 2006 00:23:17 +0000 (00:23 +0000)
already verified in .frombuf() on the lines above.  If there was
a problem an exception is raised, so there was no way this condition
could have been true.

Lib/tarfile.py

index 061d0f55b9521f081e1233ff1aa89905ab1679f8..47bc8719c3521ab3339cf8a24d62b53bb9a78aa9 100644 (file)
@@ -1750,13 +1750,6 @@ class TarFile(object):
             try:
                 tarinfo = TarInfo.frombuf(buf)
 
-                # We shouldn't rely on this checksum, because some tar programs
-                # calculate it differently and it is merely validating the
-                # header block. We could just as well skip this part, which would
-                # have a slight effect on performance...
-                if tarinfo.chksum not in calc_chksums(buf):
-                    self._dbg(1, "tarfile: Bad Checksum %r" % tarinfo.name)
-
                 # Set the TarInfo object's offset to the current position of the
                 # TarFile and set self.offset to the position where the data blocks
                 # should begin.