From a6df938fefd5b51d85a45cf3f29f60ee7bb21edf Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 8 Apr 2013 22:35:02 +0300 Subject: Close #17666: Fix reading gzip files with an extra field. --- Lib/gzip.py | 3 ++- Lib/test/test_gzip.py | 7 +++++++ Misc/NEWS | 17 ++++++++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Lib/gzip.py b/Lib/gzip.py index 8fb1ed0..0adfd3f 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -280,7 +280,8 @@ class GzipFile(io.BufferedIOBase): if flag & FEXTRA: # Read & discard the extra field, if present - self._read_exact(struct.unpack("