Fix verbose log when stdout/stderr encoding is None

See: 5c10453827
This commit is contained in:
pukkandan
2022-03-04 19:45:05 +05:30
parent 933dbf5a55
commit 2a938746f3

View File

@@ -3588,7 +3588,7 @@ class YoutubeDL(object):
return
def get_encoding(stream):
ret = getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__)
ret = str(getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__))
if not supports_terminal_sequences(stream):
from .compat import WINDOWS_VT_MODE
ret += ' (No VT)' if WINDOWS_VT_MODE is False else ' (No ANSI)'