From fd5231a5445f0a61d3a7678d1980a94dc1c80544 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 28 Nov 2024 09:13:41 +0100 Subject: 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: 70bd343fb273ad174e56d08c8b80c5594501e030) Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- bitbake/lib/bb/fetch2/git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch2/git.py') diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index c7ff769fdf..6029144601 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -926,9 +926,8 @@ class Git(FetchMethod): commits = None else: if not os.path.exists(rev_file) or not os.path.getsize(rev_file): - from pipes import quote commits = bb.fetch2.runfetchcmd( - "git rev-list %s -- | wc -l" % quote(rev), + "git rev-list %s -- | wc -l" % shlex.quote(rev), d, quiet=True).strip().lstrip('0') if commits: open(rev_file, "w").write("%d\n" % int(commits)) -- cgit v1.2.3-54-g00ecf