diff --git a/rich/console.py b/rich/console.py index 05e95da9..c59f0d77 100644 --- a/rich/console.py +++ b/rich/console.py @@ -2008,15 +2008,9 @@ class Console: if self.legacy_windows: fileno = get_fileno(self.file) if fileno is not None: - try: - use_legacy_windows_render = ( - fileno in _STD_STREAMS_OUTPUT - ) - except Exception: - # `fileno` is documented as potentially raising a OSError - # Alas, from the issues, there are so many poorly implemented file-like objects, - # that `fileno()` can raise just about anything. - pass + use_legacy_windows_render = ( + fileno in _STD_STREAMS_OUTPUT + ) if use_legacy_windows_render: from rich._win32_console import LegacyWindowsTerm