Skip to content

Commit f57fecb

Browse files
committed
Do not close sys.stdxx files
1 parent 85bb78c commit f57fecb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/isal/igzip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,10 @@ def main():
282282
break
283283
out_file.write(block)
284284
finally:
285-
in_file.close()
286-
out_file.close()
285+
if in_file is not sys.stdin.buffer:
286+
in_file.close()
287+
if out_file is not sys.stdout.buffer:
288+
out_file.close()
287289

288290

289291
if __name__ == "__main__":

0 commit comments

Comments
 (0)