Backport to Python 3.6

This commit is contained in:
Peter J. Holzer 2023-05-06 00:13:52 +02:00
parent 5047a56fe8
commit a95ba6c51f
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ import time
import ltsdb_record
p = subprocess.run(["/usr/bin/lsb_release", "-ir"], capture_output=True, text=True)
p = subprocess.run(["/usr/bin/lsb_release", "-ir"],
stdout=subprocess.PIPE, universal_newlines=True)
for ln in p.stdout.split("\n")[:-1]:
m = re.match(r"(.*?)\s*:\s+(.*)", ln)
if m: