1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-01 03:22:52 -05:00

[cleanup] Deprecate more compat functions (#11439)

Authored by: seproDev
This commit is contained in:
sepro
2024-11-17 00:24:11 +01:00
committed by GitHub
parent 1d253b0a27
commit f95a92b3d0
38 changed files with 218 additions and 363 deletions

View File

@ -9,7 +9,6 @@ import types
import yt_dlp.extractor
from yt_dlp import YoutubeDL
from yt_dlp.compat import compat_os_name
from yt_dlp.utils import preferredencoding, try_call, write_string, find_available_port
if 'pytest' in sys.modules:
@ -49,7 +48,7 @@ def report_warning(message, *args, **kwargs):
Print the message to stderr, it will be prefixed with 'WARNING:'
If stderr is a tty file the 'WARNING:' will be colored
"""
if sys.stderr.isatty() and compat_os_name != 'nt':
if sys.stderr.isatty() and os.name != 'nt':
_msg_header = '\033[0;33mWARNING:\033[0m'
else:
_msg_header = 'WARNING:'