diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-10 00:23:17 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-10 00:23:17 +0000 |
commit | 008d7a88781c570adc0f793592389efa4987daf7 (patch) | |
tree | 85ad6a772361e37e1f56cb9c8caf8e46c475fd21 /Lib/tarfile.py | |
parent | 26e16b106c1741a5f2ab98aef0651bc63db1de5e (diff) | |
download | cpython-008d7a88781c570adc0f793592389efa4987daf7.tar.gz |
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.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 061d0f55b9..47bc8719c3 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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. |