]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/utils.py
[compat] Suppress errors in enabling VT mode
[yt-dlp.git] / yt_dlp / utils.py
index 6831f0773d54d78b907ba32443c552805eb79a3d..15cc4d3b2c94ef20a51f147be7c96cc7293ac536 100644 (file)
@@ -6592,7 +6592,8 @@ def jwt_decode_hs256(jwt):
 
 def supports_terminal_sequences(stream):
     if compat_os_name == 'nt':
-        if get_windows_version() < (10, 0, 10586):
+        from .compat import WINDOWS_VT_MODE  # Must be imported locally
+        if not WINDOWS_VT_MODE or get_windows_version() < (10, 0, 10586):
             return False
     elif not os.getenv('TERM'):
         return False