# HG changeset patch # User Neal Norwitz # Date 1152490997 0 # Node ID c02fa187e0f49cb2dca7a9c448db53618a66e691 # Parent 8cc9784130a0e83d06277e597af0a64860e796ef Part of SF patch #1484695. This removes dead code. The chksum was 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. diff -r 8cc9784130a0 -r c02fa187e0f4 Lib/tarfile.py --- a/Lib/tarfile.py Mon Jul 10 00:05:34 2006 +0000 +++ b/Lib/tarfile.py Mon Jul 10 00:23:17 2006 +0000 @@ -1750,13 +1750,6 @@ 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.