mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
- Updated jc/parsers/pci_ids.py adding a check to see if the subvendor dict is already created - Updated test fixture Signed-off-by: Sam SIU <23556929+ssiuhk@users.noreply.github.com> Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
This commit is contained in:
@ -182,7 +182,8 @@ def parse(
|
||||
if vdc_subvendor:
|
||||
subvendor = '_' + vdc_subvendor.groupdict()['subvendor']
|
||||
subdevice = '_' + vdc_subvendor.groupdict()['subdevice']
|
||||
vdc_obj[vendor_id][device_id][subvendor] = {}
|
||||
if not vdc_obj[vendor_id][device_id].get(subvendor) or not isinstance(vdc_obj[vendor_id][device_id][subvendor], dict):
|
||||
vdc_obj[vendor_id][device_id][subvendor] = {}
|
||||
vdc_obj[vendor_id][device_id][subvendor][subdevice] = {}
|
||||
vdc_obj[vendor_id][device_id][subvendor][subdevice]['subsystem_name'] = vdc_subvendor.groupdict()['subsystem_name']
|
||||
continue
|
||||
|
2
tests/fixtures/generic/pci.ids.json
vendored
2
tests/fixtures/generic/pci.ids.json
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user