Commit 6571dcf
committed
sof-dump-status.py: don't crash on unknown Intel audio PCI devices
Set pci_info['hw_name'] to "PCI device unknown by SOF" and keep going.
Before this commit, any test that invokes sof-dump-status.py for any
reason crashes like this when the PCI ID is unknown:
```
Traceback (most recent call last):
File "sof-test/tools/sof-dump-status.py", line 497, in <module>
sysinfo.loadPCI()
File "sof-test/tools/sof-dump-status.py", line 139, in loadPCI
pci_info['hw_name'] = self._pci_ids["0x" + tmp_line[4] + tmp_line[3]]
KeyError: '0xe328'
```
The lack of a known PCI ID does not have to be fatal: there are plenty
of use cases where the PCI ID is not needed. This commit makes it
possible to run all these test cases even when the PCI ID is unknown.
This could help with #288 too.
Signed-off-by: Marc Herbert <Marc.Herbert@intel.com>1 parent f2e3ae9 commit 6571dcf
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
0 commit comments