summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-30 14:11:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-01 14:54:16 +0100
commit6ffecc808365f7399fb58d53dcd07ff951eba3c7 (patch)
tree224d08ec408132f818618e1a8cbcb2a9091524d2 /bitbake/lib
parent9347bef90bb7c2d803f5ab304709f07b1f3d2290 (diff)
downloadpoky-6ffecc808365f7399fb58d53dcd07ff951eba3c7.tar.gz
bitbake: fetch2/git: Use quote from shlex, not pipes
The pipes module is removed in python 3.13. It was already using the quote function from shlex so use that directly instead. The module already imports shlex too so it is an easy substitution. (Bitbake rev: 9ef4f2a30127455562e38e869793a723eed6c07c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/git.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 6a1f47a32e..5b678827ed 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -952,9 +952,8 @@ class Git(FetchMethod):
952 commits = None 952 commits = None
953 else: 953 else:
954 if not os.path.exists(rev_file) or not os.path.getsize(rev_file): 954 if not os.path.exists(rev_file) or not os.path.getsize(rev_file):
955 from pipes import quote
956 commits = bb.fetch2.runfetchcmd( 955 commits = bb.fetch2.runfetchcmd(
957 "git rev-list %s -- | wc -l" % quote(rev), 956 "git rev-list %s -- | wc -l" % shlex.quote(rev),
958 d, quiet=True).strip().lstrip('0') 957 d, quiet=True).strip().lstrip('0')
959 if commits: 958 if commits:
960 open(rev_file, "w").write("%d\n" % int(commits)) 959 open(rev_file, "w").write("%d\n" % int(commits))