Commit e9aa3e36 authored by Grzegorz Chwierut's avatar Grzegorz Chwierut Committed by Anas Nashif
Browse files

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: default avatarGrzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
parent 95f8c266
Loading
Loading
Loading
Loading
+1 −1
Changes for scripts/pylib/twister/twisterlib/hardwaremap.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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