Skip to content

Commit ca57901

Browse files
authored
bugfix - additional null checks (ExpressLRS#249)
1 parent 8118bbc commit ca57901

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/python/serials_find.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def serial_ports():
1919
print(" ** Searching flight controllers **")
2020
__ports = list(comports())
2121
for port in __ports:
22-
if port.manufacturer in ['FTDI', 'Betaflight', ] or \
23-
"STM32" in port.product or port.vid == 0x0483:
22+
if (port.manufacturer and port.manufacturer in ['FTDI', 'Betaflight', ]) or \
23+
(port.product and "STM32" in port.product) or (port.vid and port.vid == 0x0483):
2424
print(" > FC found from '%s'" % port.device)
2525
ports.append(port.device)
2626
except ImportError:

0 commit comments

Comments
 (0)