Backport to Python 3.6
This commit is contained in:
parent
5047a56fe8
commit
a95ba6c51f
|
@ -5,7 +5,8 @@ import time
|
||||||
|
|
||||||
import ltsdb_record
|
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]:
|
for ln in p.stdout.split("\n")[:-1]:
|
||||||
m = re.match(r"(.*?)\s*:\s+(.*)", ln)
|
m = re.match(r"(.*?)\s*:\s+(.*)", ln)
|
||||||
if m:
|
if m:
|
||||||
|
|
Loading…
Reference in New Issue