diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-27 21:20:30 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-02 06:06:09 -0700 |
| commit | c4eb4d6365635a6eb2533f34a336425554e8a5ce (patch) | |
| tree | f131204c9da5ce615880f471850e38e2bdc0c3c9 /bitbake | |
| parent | 1ab34a5f6407b597f569c4b08d341e82db488f2c (diff) | |
| download | poky-c4eb4d6365635a6eb2533f34a336425554e8a5ce.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: 53264dc14554890b3a2afc83cb1749cf10d86854)
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/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 9ecc855af8..dc86aabfe2 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
| @@ -861,9 +861,8 @@ class Git(FetchMethod): | |||
| 861 | commits = None | 861 | commits = None |
| 862 | else: | 862 | else: |
| 863 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): | 863 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): |
| 864 | from pipes import quote | ||
| 865 | commits = bb.fetch2.runfetchcmd( | 864 | commits = bb.fetch2.runfetchcmd( |
| 866 | "git rev-list %s -- | wc -l" % quote(rev), | 865 | "git rev-list %s -- | wc -l" % shlex.quote(rev), |
| 867 | d, quiet=True).strip().lstrip('0') | 866 | d, quiet=True).strip().lstrip('0') |
| 868 | if commits: | 867 | if commits: |
| 869 | open(rev_file, "w").write("%d\n" % int(commits)) | 868 | open(rev_file, "w").write("%d\n" % int(commits)) |
