diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-10 11:08:19 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-10 11:08:58 +0530 |
commit | fe1daad3cb224904cc72462204da5f6427be6f44 (patch) | |
tree | 49192119322696c5f689289baff5b74e1ca4e210 /yt_dlp/utils.py | |
parent | 0f06bcd7591332937fdec497d6cbb4914358bc79 (diff) | |
download | hypervideo-pre-fe1daad3cb224904cc72462204da5f6427be6f44.tar.lz hypervideo-pre-fe1daad3cb224904cc72462204da5f6427be6f44.tar.xz hypervideo-pre-fe1daad3cb224904cc72462204da5f6427be6f44.zip |
Bugfix for 59f943cd5097e9bdbc3cb3e6b5675e43d369341a
Fixes: https://github.com/yt-dlp/yt-dlp/commit/59f943cd5097e9bdbc3cb3e6b5675e43d369341a#commitcomment-73251597
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 62dc412a8..c9589537f 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -1881,8 +1881,7 @@ def write_string(s, out=None, encoding=None): assert isinstance(s, str) out = out or sys.stderr - from .compat import WINDOWS_VT_MODE # Must be imported locally - if WINDOWS_VT_MODE: + if compat_os_name == 'nt' and supports_terminal_sequences(out): s = re.sub(r'([\r\n]+)', r' \1', s) if 'b' in getattr(out, 'mode', ''): |