1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-18 15:15:42 +07:00

[options] Add --no-color

This commit is contained in:
Philipp Hagemeister
2015-02-10 04:22:10 +01:00
parent f7a211dcc8
commit 7e5db8c930
4 changed files with 10 additions and 3 deletions

View File

@@ -514,7 +514,7 @@ def _search_regex(self, pattern, string, name, default=_NO_DEFAULT, fatal=True,
if mobj:
break
if os.name != 'nt' and sys.stderr.isatty():
if not self._downloader.params.get('no_color') and os.name != 'nt' and sys.stderr.isatty():
_name = '\033[0;34m%s\033[0m' % name
else:
_name = name