From af49df623efc68ca6c47ab2dcaaa83997a28cdb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Dec 2017 15:42:25 +0100 Subject: [PATCH] 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. --- hwdb/ids_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwdb/ids_parser.py b/hwdb/ids_parser.py index 3c43649..c80d222 100755 --- a/hwdb/ids_parser.py +++ b/hwdb/ids_parser.py @@ -344,17 +344,17 @@ if __name__ == '__main__': args = sys.argv[1:] 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_classes(p) 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_classes(p) 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_classes(p) -- 2.7.4