1
0
mirror of https://github.com/jonathanhogg/scopething synced 2025-07-14 03:02:09 +01:00

Historic bug; saner method naming; linter fix

This commit is contained in:
2020-06-27 14:51:12 +01:00
parent 8c522205e6
commit 751cacba6d
2 changed files with 7 additions and 8 deletions

View File

@ -39,8 +39,8 @@ class Scope(vm.VirtualMachine):
async def connect(self, url=None):
if url is None:
for port in streams.SerialStream.ports_matching(vid=0x0403, pid=0x6001):
url = f'file:{port.device}'
for device in streams.SerialStream.devices_matching(vid=0x0403, pid=0x6001):
url = f'file:{device}'
break
else:
raise RuntimeError("No matching serial device found")