[jython] Introduce compat_os_name

os.name is always 'java' on Jython
This commit is contained in:
Yen Chi Hsuan 2016-03-03 19:24:24 +08:00
parent 0cae023b24
commit e9c0cdd389
6 changed files with 28 additions and 17 deletions

View file

@ -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):