Commit 47465e6
committed
linux: fix parsing of old systemd 'type' right after boot
With old systemd (before 240), just after boot, the
get_systemd_status_raw function fails with the following exception:
ValueError: invalid literal for int() with base 10: '2 "star'
Calling `print(path_and_id)` before parsing prints the following:
/org/freedesktop/systemd1/unit/syslog_2eservice" 0 "
/org/freedesktop/systemd1/unit/alsa_2drestore_2eservice" 0 "
/org/freedesktop/systemd1/unit/dev_2dram0_2edevice" 0 "
/org/freedesktop/systemd1/unit/multi_2duser_2etarget" 2 "start
The last line causes the error which is fixed by this patch.
Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com>1 parent b2c745d commit 47465e6
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
0 commit comments