we know lshw might fail, do not load as json

This commit is contained in:
pedro 2024-10-15 13:54:16 +02:00
parent 4f5e5f6b00
commit a99e6b52b1

View file

@ -250,7 +250,7 @@ def get_data(all_disks):
dmidecode = 'sudo dmidecode'
lspci = 'sudo lspci -vv'
data = {
'lshw': json.loads(exec_cmd(lshw) or "{}"),
'lshw': exec_cmd(lshw) or "{}",
'disks': smartctl(all_disks),
'hwinfo': exec_cmd(hwinfo),
'dmidecode': exec_cmd(dmidecode),