From a8c92a9beb5a60f0ff3526a46d81b8834520b706 Mon Sep 17 00:00:00 2001 From: CeruleanSky Date: Fri, 2 Jun 2017 18:18:15 -0400 Subject: [PATCH] Check if OS is NT before checking TERM variable --- youtube_dl/YoutubeDL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 4c33d494a..fa61cfe13 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -508,14 +508,14 @@ class YoutubeDL(object): def save_console_title(self): if not self.params.get('consoletitle', False): return - if 'TERM' in os.environ: + if compat_os_name != 'nt' and 'TERM' in os.environ: # Save the title on stack self._write_string('\033[22;0t', self._screen_file) def restore_console_title(self): if not self.params.get('consoletitle', False): return - if 'TERM' in os.environ: + if compat_os_name != 'nt' and 'TERM' in os.environ: # Restore the title from stack self._write_string('\033[23;0t', self._screen_file)