Disable --jobs on Windows

Fixes #164
This commit is contained in:
Ian Cordasco 2014-09-12 16:49:34 -05:00
parent 34a2c12be8
commit 552e298a2c
2 changed files with 8 additions and 2 deletions

View file

@ -6,7 +6,7 @@ import pep8
from flake8 import __version__
from flake8.reporter import multiprocessing, BaseQReport, QueueReport
from flake8.util import OrderedSet
from flake8.util import OrderedSet, is_windows
_flake8_noqa = re.compile(r'flake8[:=]\s*noqa', re.I).search
@ -49,7 +49,7 @@ def get_parser():
except ValueError:
pass
if multiprocessing:
if multiprocessing and not is_windows():
try:
auto = multiprocessing.cpu_count() or 1
except NotImplementedError:

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import os
try:
import ast
@ -43,6 +44,11 @@ def is_flag(val):
return val.upper() in ('1', '0', 'F', 'T', 'TRUE', 'FALSE', 'ON', 'OFF')
def is_windows():
"""Determine if the system is Windows."""
return os.name == 'nt'
def flag_on(val):
"""Return true if flag is on"""
return str(val).upper() in ('1', 'T', 'TRUE', 'ON')