Issue #15800: fix the closing of input / output files when gzip is used as a script.
This commit is contained in:
parent
49ccd514d2
commit
ecc4757b79
|
@ -621,9 +621,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__':
|
||||
|
|
Loading…
Reference in New Issue