We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8118bbc commit ca57901Copy full SHA for ca57901
1 file changed
src/python/serials_find.py
@@ -19,8 +19,8 @@ def serial_ports():
19
print(" ** Searching flight controllers **")
20
__ports = list(comports())
21
for port in __ports:
22
- if port.manufacturer in ['FTDI', 'Betaflight', ] or \
23
- "STM32" in port.product or port.vid == 0x0483:
+ if (port.manufacturer and port.manufacturer in ['FTDI', 'Betaflight', ]) or \
+ (port.product and "STM32" in port.product) or (port.vid and port.vid == 0x0483):
24
print(" > FC found from '%s'" % port.device)
25
ports.append(port.device)
26
except ImportError:
0 commit comments