mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
hwdb/ids_parser: use replacement chars for invalid characters
We have some more non-utf8 characters. Let's just replace them, this doesn't matter much.
This commit is contained in:
parent
c6801f502c
commit
af49df623e
|
@ -344,17 +344,17 @@ if __name__ == '__main__':
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
if not args or 'usb' in args:
|
if not args or 'usb' in args:
|
||||||
p = usb_ids_grammar().parseFile(open('usb.ids'))
|
p = usb_ids_grammar().parseFile(open('usb.ids', errors='replace'))
|
||||||
usb_vendor_model(p)
|
usb_vendor_model(p)
|
||||||
usb_classes(p)
|
usb_classes(p)
|
||||||
|
|
||||||
if not args or 'pci' in args:
|
if not args or 'pci' in args:
|
||||||
p = pci_ids_grammar().parseFile(open('pci.ids'))
|
p = pci_ids_grammar().parseFile(open('pci.ids', errors='replace'))
|
||||||
pci_vendor_model(p)
|
pci_vendor_model(p)
|
||||||
pci_classes(p)
|
pci_classes(p)
|
||||||
|
|
||||||
if not args or 'sdio' in args:
|
if not args or 'sdio' in args:
|
||||||
p = pci_ids_grammar().parseFile(open('sdio.ids'))
|
p = pci_ids_grammar().parseFile(open('sdio.ids', errors='replace'))
|
||||||
sdio_vendor_model(p)
|
sdio_vendor_model(p)
|
||||||
sdio_classes(p)
|
sdio_classes(p)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue