Skip to content

Commit 375313f

Browse files
committed
linux.py: handle systemd version without patch info
The get_systemd_version function introduced in 55d35d5 linux: add get_systemd_version() correctly handles systemd 244 (244.3+) +PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT... but not systemd 234 +PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT.... and the call ends with following exception: ValueError: Systemd version output changed Fix it by ignoring anything that comes afer the version. Signed-off-by: Adam Trhon <[email protected]>
1 parent 3cfef85 commit 375313f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labgridhelper/linux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_systemd_version(command):
1616
out = command.run_check("systemctl --version")
1717
out = out[0]
1818

19-
parsed = re.search(r'^systemd\s+(?P<version>\d+)\s+', out)
19+
parsed = re.search(r'^systemd\s+(?P<version>\d+)', out)
2020
if not parsed:
2121
raise ValueError("Systemd version output changed")
2222
return int(parsed.group("version"))

0 commit comments

Comments
 (0)