Skip to content

Commit

Permalink
Make sure stderr file is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
rhpvorderman committed Jan 19, 2024
1 parent a42720a commit 1077f9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/xopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def close(self) -> None:
self.process.wait()
self._file.close()
stderr_message = self._read_error_message()
self._stderr.close()
self._raise_if_error(check_allowed_code_and_message, stderr_message)

def _wait_for_output_or_process_exit(self):
Expand Down

0 comments on commit 1077f9b

Please sign in to comment.