Skip to content

Commit

Permalink
fix: allow sys.stderr.fileno() to throw NotImplementedError (#2040)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Aug 10, 2023
1 parent faa256d commit 8838e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playwright/_impl/_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _get_stderr_fileno() -> Optional[int]:
return None

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

0 comments on commit 8838e31

Please sign in to comment.