diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-27 13:39:15 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-28 07:49:18 +0000 |
commit | 430ed4a884f900b5b6a38fd504dd6e8d0857af76 (patch) | |
tree | 3f022d4e0897876cdfd340c5c2998dd4f01973d4 /meta/lib/oe/utils.py | |
parent | c92709d4c0d83903695517798db71493bacc25df (diff) | |
download | poky-430ed4a884f900b5b6a38fd504dd6e8d0857af76.tar.gz |
lib/package/utils: Improve multiprocess_launch argument passing
The current code for multiple argument passing is horrible. Tweak the
multiprocess_launch function to only convert to a tuple if it isn't already
one, which means we can then use function arguments in a standard way.
(From OE-Core rev: 7c99f90079e722764ebdc30e8d0e781454b3a51a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index c9c7a47041..d272dd2b8d 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -316,7 +316,9 @@ def multiprocess_launch_mp(target, items, max_process, extraargs=None): | |||
316 | items = list(items) | 316 | items = list(items) |
317 | while (items and not errors) or launched: | 317 | while (items and not errors) or launched: |
318 | if not errors and items and len(launched) < max_process: | 318 | if not errors and items and len(launched) < max_process: |
319 | args = (items.pop(),) | 319 | args = items.pop() |
320 | if not type(args) is tuple: | ||
321 | args = (args,) | ||
320 | if extraargs is not None: | 322 | if extraargs is not None: |
321 | args = args + extraargs | 323 | args = args + extraargs |
322 | p = ProcessLaunch(target=target, args=args) | 324 | p = ProcessLaunch(target=target, args=args) |