1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 12:25:03 -04:00

[compat] Suppress errors in enabling VT mode

Closes #1932
This commit is contained in:
pukkandan
2021-12-08 19:41:54 +05:30
parent ddd24c9949
commit e3c7d49571
3 changed files with 14 additions and 3 deletions

View File

@@ -3394,7 +3394,8 @@ class YoutubeDL(object):
def get_encoding(stream):
ret = getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__)
if not supports_terminal_sequences(stream):
ret += ' (No ANSI)'
from .compat import WINDOWS_VT_MODE
ret += ' (No VT)' if WINDOWS_VT_MODE is False else ' (No ANSI)'
return ret
encoding_str = 'Encodings: locale %s, fs %s, out %s, err %s, pref %s' % (