diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 212b71f6509740..c19842192c9eef 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -490,25 +490,27 @@ def _init_read_gz(self): # taken from gzip.GzipFile with some alterations if self.__read(2) != b"\037\213": raise ReadError("not a gzip file") - if self.__read(1) != b"\010": + method, flag = struct.unpack("