tools/image-info: fix crash when parsing output from systemd >245

systemd 245 added a third column to systemctl list-unit-files, causing
the unpacking to fail.
This commit is contained in:
Ondřej Budai 2020-03-25 11:32:05 +01:00 committed by Tom Gundersen
parent 4c93d5a045
commit 9b3375ccca

View file

@ -61,7 +61,7 @@ def parse_unit_files(s, expected_state):
r = []
for line in s.split("\n")[1:]:
try:
unit, state = line.split()
unit, state, *_ = line.split()
except ValueError:
pass
if state != expected_state: