mirror of https://github.com/Textualize/rich.git
superfluous code
This commit is contained in:
parent
e8426756ef
commit
0e48776fb2
|
@ -2008,15 +2008,9 @@ class Console:
|
||||||
if self.legacy_windows:
|
if self.legacy_windows:
|
||||||
fileno = get_fileno(self.file)
|
fileno = get_fileno(self.file)
|
||||||
if fileno is not None:
|
if fileno is not None:
|
||||||
try:
|
use_legacy_windows_render = (
|
||||||
use_legacy_windows_render = (
|
fileno in _STD_STREAMS_OUTPUT
|
||||||
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
|
|
||||||
|
|
||||||
if use_legacy_windows_render:
|
if use_legacy_windows_render:
|
||||||
from rich._win32_console import LegacyWindowsTerm
|
from rich._win32_console import LegacyWindowsTerm
|
||||||
|
|
Loading…
Reference in New Issue