cpython (3.2): Issue #15800: fix the closing of input / output files when gzip is used as a

http://hg.python.org/cpython/rev/0b5ba5f610a9 changeset: 78805:0b5ba5f610a9 branch: 3.2 parent: 78803:900b82193237 user: Antoine Pitrou <solipsis@pitrou.net> date: Thu Aug 30 00:29:24 2012 +0200 summary: Issue #15800: fix the closing of input / output files when gzip is used as a script. files: Lib/gzip.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/gzip.py b/Lib/gzip.py --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -621,9 +621,9 @@ if not chunk: break g.write(chunk) - if g is not sys.stdout: + if g is not sys.stdout.buffer: g.close() - if f is not sys.stdin: + if f is not sys.stdin.buffer: f.close() if __name__ == '__main__': -- Repository URL: http://hg.python.org/cpython
participants (1)
-
antoine.pitrou