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:
parent
4c93d5a045
commit
9b3375ccca
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue