superfluous code

This commit is contained in:
Will McGugan 2022-11-30 17:08:46 +07:00
parent e8426756ef
commit 0e48776fb2
1 changed files with 3 additions and 9 deletions

View File

@ -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