We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2baa66 commit 478a204Copy full SHA for 478a204
coverage/debug.py
@@ -497,13 +497,15 @@ def _del_singleton_data(cls) -> None:
497
def write(self, text: str) -> None:
498
"""Just like file.write, but filter through all our filters."""
499
assert self.outfile is not None
500
- self.outfile.write(filter_text(text, self.filters))
501
- self.outfile.flush()
+ if not self.outfile.closed:
+ self.outfile.write(filter_text(text, self.filters))
502
+ self.outfile.flush()
503
504
def flush(self) -> None:
505
"""Flush our file."""
506
507
508
509
510
511
def log(msg: str, stack: bool = False) -> None: # pragma: debugging
0 commit comments