Fix flake8 issue

This commit is contained in:
Bruno Oliveira
2018-07-21 12:09:44 -03:00
parent 04882074e1
commit a06e75cc78
2 changed files with 4 additions and 3 deletions

View File

@@ -6,13 +6,14 @@ def parse_numprocesses(s):
if s == 'auto':
try:
from os import sched_getaffinity
def cpu_count():
return len(sched_getaffinity(0))
except ImportError:
try:
from os import cpu_count
except ImportError:
from multiprocessing import cpu_count
else:
def cpu_count():
return len(sched_getaffinity(0))
try:
n = cpu_count()