1
0
mirror of https://github.com/jonathanhogg/scopething synced 2025-07-13 10:52:08 +01:00

Modified streams.py so that it works also with unspecified serial_number.

This commit is contained in:
Michael Huebler
2021-02-14 16:16:23 +01:00
parent f3748a4c6a
commit 759828c637

View File

@ -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