diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-10 07:08:22 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-10 09:31:59 +0530 |
commit | d1d5c08f29b3b1d60d8b11b812029757fe3fd90a (patch) | |
tree | 51c2edd74113821bbe47a3c13aff5294ccc522f5 /yt_dlp/YoutubeDL.py | |
parent | 2e01ba62181fee12bf44b8f3f6cb0f46cd591e61 (diff) |
[minicurses] Fix when printing to file
Closes #1215
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 2b3c33ce5..49d6b3779 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -514,6 +514,7 @@ class YoutubeDL(object): self.cache = Cache(self) windows_enable_vt_mode() + # FIXME: This will break if we ever print color to stdout self.params['no_color'] = self.params.get('no_color') or not supports_terminal_sequences(self._err_file) if sys.version_info < (3, 6): @@ -3298,6 +3299,9 @@ class YoutubeDL(object): KEYRING_AVAILABLE and 'keyring', )))) or 'none' self._write_string('[debug] Optional libraries: %s\n' % lib_str) + self._write_string('[debug] ANSI escape support: stdout = %s, stderr = %s\n' % ( + supports_terminal_sequences(self._screen_file), + supports_terminal_sequences(self._err_file))) proxy_map = {} for handler in self._opener.handlers: |