Переглянути джерело

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>
Antonin Godard 2 тижнів тому
батько
коміт
3f90a5b12d
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      documentation/set_versions.py

+ 1 - 1
documentation/set_versions.py

@@ -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-"):