diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 11b6ed524..1fc0624a3 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -295,7 +295,7 @@ def _search_regex(self, pattern, string, name, default=None, fatal=True, flags=0 mobj = re.search(p, string, flags) if mobj: break - if sys.stderr.isatty() and os.name != 'nt': + if os.name != 'nt' and sys.stderr.isatty(): _name = u'\033[0;34m%s\033[0m' % name else: _name = name