Skip to content

Commit

Permalink
Stderr/stdout handlers need to be narrowed before closing
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoor committed Jan 31, 2022
1 parent 6edb08a commit 8cd72db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lithium/interestingness/timed_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def timed_run(
print(" %s" % exc)
sys.exit(2)
finally:
if log_prefix is not None:
if isinstance(child_stderr, BinaryIO) and isinstance(child_stdout, BinaryIO):
child_stdout.close()
child_stderr.close()
elapsed_time = time.time() - start_time
Expand Down

0 comments on commit 8cd72db

Please sign in to comment.