diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-30 00:30:14 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-30 00:30:14 +0200 |
commit | 2a021c80ce9c2d67472727426cc2c0949f31b7de (patch) | |
tree | c3afcf1bebdd75bb5cb3bf2ab0c06c460d500ac9 /Lib/gzip.py | |
parent | 75883ad45a3de2b5085dec566e8c7488b94872a1 (diff) | |
parent | ecc4757b79c7d8f7b09fbc2e8b24258c22cfed12 (diff) | |
download | cpython-git-2a021c80ce9c2d67472727426cc2c0949f31b7de.tar.gz |
Issue #15800: fix the closing of input / output files when gzip is used as a script.
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r-- | Lib/gzip.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py index b6656a933e..d8abffdd56 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -670,9 +670,9 @@ def _test(): 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__': |