mirror of
https://github.com/jonathanhogg/scopething
synced 2025-07-13 18:52:10 +01:00
Merge pull request #1 from mh-/main
Fixed small problem when serial_number is not specified.
This commit is contained in:
@ -24,7 +24,7 @@ class SerialStream:
|
||||
@classmethod
|
||||
def devices_matching(cls, vid=None, pid=None, serial_number=None):
|
||||
for port in comports():
|
||||
if (vid is None or vid == port.vid) and (pid is None or pid == port.pid) and (serial is None or serial_number == port.serial_number):
|
||||
if (vid is None or vid == port.vid) and (pid is None or pid == port.pid) and (serial_number is None or serial_number == port.serial_number):
|
||||
yield port.device
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user