Skip to content

Commit 8838e31

Browse files
authored
fix: allow sys.stderr.fileno() to throw NotImplementedError (microsoft#2040)
1 parent faa256d commit 8838e31

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
@@ -37,7 +37,7 @@ def _get_stderr_fileno() -> Optional[int]:
3737
return None
3838

3939
return sys.stderr.fileno()
40-
except (AttributeError, io.UnsupportedOperation):
40+
except (NotImplementedError, AttributeError, io.UnsupportedOperation):
4141
# pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.
4242
# https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors
4343
# This is potentially dangerous, but the best we can do.

0 commit comments

Comments
 (0)