diff options
| author | Bin Lan <bin.lan.cn@windriver.com> | 2025-09-05 11:36:32 -0400 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-11-14 06:45:29 -0800 |
| commit | 324f29337bd8ba96e6b7c3860cfb7f8c6e422db9 (patch) | |
| tree | 47b2301ee1cb305d9132edb6361767e692e57426 /bitbake | |
| parent | b33a8abe77081a2bdda0d89c61736473b2f9bb8b (diff) | |
| download | poky-324f29337bd8ba96e6b7c3860cfb7f8c6e422db9.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: c2a54aceab4c75cea6f8be16fe6d0caed12b32c4)
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake')
| -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 1a6ff25d4d..7b75d5d83a 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -460,7 +460,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): | |||
| 460 | for k in replacements: | 460 | for k in replacements: |
| 461 | uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) | 461 | uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) |
| 462 | #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) | 462 | #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) |
| 463 | result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], 1) | 463 | result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], count=1) |
| 464 | if loc == 2: | 464 | if loc == 2: |
| 465 | # Handle path manipulations | 465 | # Handle path manipulations |
| 466 | basename = None | 466 | basename = None |
