summaryrefslogtreecommitdiffstats
path: root/Lib/gzip.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r--Lib/gzip.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 0bf29e8..c37d5a1 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -371,7 +371,12 @@ class GzipFile:
self.extrasize = 0
self.offset = 0
- def seek(self, offset):
+ def seek(self, offset, whence=0):
+ if whence:
+ if whence == 1:
+ offset = self.offset + offset
+ else:
+ raise ValueError('Seek from end not supported')
if self.mode == WRITE:
if offset < self.offset:
raise IOError('Negative seek in write mode')