From e9aa3e36a9a8153c84786778a50e71198854f54a Mon Sep 17 00:00:00 2001 From: Grzegorz Chwierut Date: Wed, 20 Dec 2023 09:51:01 +0100 Subject: [PATCH] twister: second fix for hardware map detection When scanning ports the manufacture field is not always filled. It must be checked before using. Signed-off-by: Grzegorz Chwierut --- scripts/pylib/twister/twisterlib/hardwaremap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pylib/twister/twisterlib/hardwaremap.py b/scripts/pylib/twister/twisterlib/hardwaremap.py index 438f5cf5d4..27bca00718 100644 --- a/scripts/pylib/twister/twisterlib/hardwaremap.py +++ b/scripts/pylib/twister/twisterlib/hardwaremap.py @@ -287,7 +287,7 @@ class HardwareMap: serial_devices = list_ports.comports() logger.info("Scanning connected hardware...") for d in serial_devices: - if d.manufacturer.casefold() in [m.casefold() for m in self.manufacturer]: + if d.manufacturer and d.manufacturer.casefold() in [m.casefold() for m in self.manufacturer]: # TI XDS110 can have multiple serial devices for a single board # assume endpoint 0 is the serial, skip all others