diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-30 14:11:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-01 12:42:24 +0100 |
commit | 312488228ad408fb0f29b2aa272e72cf87de8e93 (patch) | |
tree | d3de4066a0a60b3183ffd863b23a93c5dc0af85e /bitbake/lib | |
parent | 5ac9869961ca841df8a23250235d77d603b60465 (diff) | |
download | poky-312488228ad408fb0f29b2aa272e72cf87de8e93.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.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 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)) |