set_versions.py: fix subprocess.run call for older distros

Like in 28850c974a38 ("set_versions.py: use backward-compatible python
argument in run"), replace the capture_output options by Python <3.7
compatible ones.

(From yocto-docs rev: 6e1f4c18a13f369423599529a6960da5e3947d01)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Antonin Godard 2025-10-03 09:33:26 +02:00 committed by Richard Purdie
parent 4c4c2e2bb2
commit 3f90a5b12d

View File

@ -172,7 +172,7 @@ series = [k for k in release_series]
previousseries = series[series.index(ourseries)+1:] or [""]
lastlts = [k for k in previousseries if k in ltsseries] or "dunfell"
latestreltag = subprocess.run(["git", "describe", "--abbrev=0", "--tags", "--match", "yocto-*"], capture_output=True, text=True).stdout
latestreltag = subprocess.run(["git", "describe", "--abbrev=0", "--tags", "--match", "yocto-*"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout
latestreltag = latestreltag.strip()
if latestreltag:
if latestreltag.startswith("yocto-"):