Skip to content

Commit 28bba74

Browse files
authored
fix: stderr forward if no stderr exists (microsoft#472)
Fixes microsoft#471
1 parent 659b0e6 commit 28bba74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playwright/_impl/_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _get_stderr_fileno() -> Optional[int]:
2929
# pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.
3030
# https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors
3131
# This is potentially dangerous, but the best we can do.
32-
if not hasattr(sys, "__stderr__"):
32+
if not hasattr(sys, "__stderr__") or not sys.__stderr__:
3333
return None
3434
return sys.__stderr__.fileno()
3535

0 commit comments

Comments
 (0)