Skip to content

Commit c16481b

Browse files
authored
fix: don't use closed stderr when launching driver process (#1100)
Fixes #1098
1 parent cfea04a commit c16481b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

playwright/_impl/_transport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333

3434
# Sourced from: https://github.com/pytest-dev/pytest/blob/da01ee0a4bb0af780167ecd228ab3ad249511302/src/_pytest/faulthandler.py#L69-L77
3535
def _get_stderr_fileno() -> Optional[int]:
36+
if sys.stderr.closed:
37+
return None
38+
3639
try:
3740
return sys.stderr.fileno()
3841
except (AttributeError, io.UnsupportedOperation):

0 commit comments

Comments
 (0)