diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index e350b05ddf..aee4336482 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -248,9 +248,10 @@ def trim_version(version, num_parts=2): | |||
248 | trimmed = ".".join(parts[:num_parts]) | 248 | trimmed = ".".join(parts[:num_parts]) |
249 | return trimmed | 249 | return trimmed |
250 | 250 | ||
251 | def cpu_count(): | 251 | def cpu_count(at_least=1): |
252 | import multiprocessing | 252 | import multiprocessing |
253 | return multiprocessing.cpu_count() | 253 | cpus = multiprocessing.cpu_count() |
254 | return max(cpus, at_least) | ||
254 | 255 | ||
255 | def execute_pre_post_process(d, cmds): | 256 | def execute_pre_post_process(d, cmds): |
256 | if cmds is None: | 257 | if cmds is None: |