diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-28 09:13:41 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-28 05:36:00 -0800 |
| commit | fd5231a5445f0a61d3a7678d1980a94dc1c80544 (patch) | |
| tree | cf2607f0fa8f2b47ff9ce3627012795302ce6e45 /bitbake/lib/bb/fetch2/git.py | |
| parent | 1e93d7555fe898400980b29987036a83331e0eaa (diff) | |
| download | poky-fd5231a5445f0a61d3a7678d1980a94dc1c80544.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: 70bd343fb273ad174e56d08c8b80c5594501e030)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 3 |
1 files changed, 1 insertions, 2 deletions
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): | |||
| 926 | commits = None | 926 | commits = None |
| 927 | else: | 927 | else: |
| 928 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): | 928 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): |
| 929 | from pipes import quote | ||
| 930 | commits = bb.fetch2.runfetchcmd( | 929 | commits = bb.fetch2.runfetchcmd( |
| 931 | "git rev-list %s -- | wc -l" % quote(rev), | 930 | "git rev-list %s -- | wc -l" % shlex.quote(rev), |
| 932 | d, quiet=True).strip().lstrip('0') | 931 | d, quiet=True).strip().lstrip('0') |
| 933 | if commits: | 932 | if commits: |
| 934 | open(rev_file, "w").write("%d\n" % int(commits)) | 933 | open(rev_file, "w").write("%d\n" % int(commits)) |
