mirror of
https://github.com/jonathanhogg/scopething
synced 2025-07-13 18:52:10 +01:00
Modified streams.py so that it works also with unspecified serial_number.
This commit is contained in:
@ -24,7 +24,7 @@ class SerialStream:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def devices_matching(cls, vid=None, pid=None, serial_number=None):
|
def devices_matching(cls, vid=None, pid=None, serial_number=None):
|
||||||
for port in comports():
|
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
|
yield port.device
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Reference in New Issue
Block a user