Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d813e5

Browse files
committed
Fixed 'return EOFError' that should be 'raise EOFError', caught by
Skip Montanaro's return-value patches.
1 parent a07934e commit 2d813e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/gzip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _read(self, size=1024):
182182
self.fileobj.seek(0, 2) # Seek to end of file
183183
if pos == self.fileobj.tell():
184184
self.fileobj = None
185-
return EOFError, "Reached EOF"
185+
raise EOFError, "Reached EOF"
186186
else:
187187
self.fileobj.seek( pos ) # Return to original position
188188

0 commit comments

Comments
 (0)