diff options
author | Bin Lan <bin.lan.cn@windriver.com> | 2025-01-09 10:00:02 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-14 09:51:45 +0000 |
commit | 33271912bf25a51d86cf07f5d3e2042c04d17245 (patch) | |
tree | 035fa2a16a84ad7e4d7337235145d8ad5b71fe5c /bitbake/lib | |
parent | 2abb0028ba91291e13fe7c218d87dd7e6f379ace (diff) | |
download | poky-33271912bf25a51d86cf07f5d3e2042c04d17245.tar.gz |
bitbake: bb/fetch2/__init__.py: remove a DeprecationWarning in uri_replace()
There is the following warning when executing to bitbake linux-yocto:
bitbake/lib/bb/fetch2/__init__.py:464: DeprecationWarning: 'count' is passed as positional argument
This is because the 4th parameter of re.sub(pattern, repl, string, count=0, flags=0)
is a keyword parameter. We use keyword arguments for parameters that are not positional.
(Bitbake rev: 4bd62639f7023eec9f55ad7909fa9250538de936)
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 4dc94e6f2b..de36f06bfc 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -461,7 +461,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): | |||
461 | for k in replacements: | 461 | for k in replacements: |
462 | uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) | 462 | uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) |
463 | #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) | 463 | #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) |
464 | result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], 1) | 464 | result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], count=1) |
465 | if loc == 2: | 465 | if loc == 2: |
466 | # Handle path manipulations | 466 | # Handle path manipulations |
467 | basename = None | 467 | basename = None |