summaryrefslogtreecommitdiff
path: root/Lib/compileall.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-22 11:01:38 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-22 11:01:38 +0300
commit949c416dc61faa6dad398bc5a34781ff152ddc23 (patch)
tree0f46c9bb2e635652ec2ea572ac3e4ed9d24dd0cc /Lib/compileall.py
parent71b49dde3a1162248e43ff99f4e83aae07747341 (diff)
parentd86ef05a02e820adfd1e3a11cd56d3444d9aa2c9 (diff)
downloadcpython-git-949c416dc61faa6dad398bc5a34781ff152ddc23.tar.gz
Merge heads
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r--Lib/compileall.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index aeaaf8e9ce..64c0a9abdb 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -69,11 +69,9 @@ def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels,
ddir=ddir)
success = 1
- if workers is not None and workers != 1:
+ if workers is not None and workers != 1 and ProcessPoolExecutor is not None:
if workers < 0:
raise ValueError('workers must be greater or equal to 0')
- if ProcessPoolExecutor is None:
- raise NotImplementedError('multiprocessing support not available')
workers = workers or None
with ProcessPoolExecutor(max_workers=workers) as executor: