diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-03-03 19:24:24 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-03-03 19:24:24 +0800 |
commit | e9c0cdd3895436170de33324c1762364380c6a5a (patch) | |
tree | cab04671b031f85f9c98634a35927e0b1fefbff4 /youtube_dl/downloader | |
parent | 0cae023b244ffdb37338da97a5e506487b20d7d6 (diff) |
[jython] Introduce compat_os_name
os.name is always 'java' on Jython
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py index 2d5154051..f39db58f6 100644 --- a/youtube_dl/downloader/common.py +++ b/youtube_dl/downloader/common.py @@ -5,6 +5,7 @@ import re import sys import time +from ..compat import compat_os_name from ..utils import ( encodeFilename, error_to_compat_str, @@ -219,7 +220,7 @@ class FileDownloader(object): if self.params.get('progress_with_newline', False): self.to_screen(fullmsg) else: - if os.name == 'nt': + if compat_os_name == 'nt': prev_len = getattr(self, '_report_progress_prev_line_length', 0) if prev_len > len(fullmsg): |