summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-10 00:23:17 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-10 00:23:17 (GMT)
commit4a5fbda66d3132af761e32e164ed398977f51694 (patch)
treec4f3d1c810fe77e29e857357c9f8f444be8a454e
parent8440483feab47f314eaf4f6e4f32d13dfa35741d (diff)
downloadcpython-4a5fbda66d3132af761e32e164ed398977f51694.zip
cpython-4a5fbda66d3132af761e32e164ed398977f51694.tar.gz
cpython-4a5fbda66d3132af761e32e164ed398977f51694.tar.bz2
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.
-rw-r--r--Lib/tarfile.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 061d0f5..47bc871 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.