Lines 1-4
Link Here
|
1 |
--- NanoVNASaver/Hardware/Hardware.py.orig 2022-01-04 07:44:03 UTC |
1 |
--- NanoVNASaver/Hardware/Hardware.py.orig 2022-04-01 14:51:11 UTC |
2 |
+++ NanoVNASaver/Hardware/Hardware.py |
2 |
+++ NanoVNASaver/Hardware/Hardware.py |
3 |
@@ -34,6 +34,7 @@ from NanoVNASaver.Hardware.NanoVNA_H4 import NanoVNA_H |
3 |
@@ -34,6 +34,7 @@ from NanoVNASaver.Hardware.NanoVNA_H4 import NanoVNA_H |
4 |
from NanoVNASaver.Hardware.NanoVNA_V2 import NanoVNA_V2 |
4 |
from NanoVNASaver.Hardware.NanoVNA_V2 import NanoVNA_V2 |
Lines 20-26
Link Here
|
20 |
for t in USBDEVICETYPES: |
20 |
for t in USBDEVICETYPES: |
21 |
if d.vid != t.vid or d.pid != t.pid: |
21 |
if d.vid != t.vid or d.pid != t.pid: |
22 |
continue |
22 |
continue |
23 |
@@ -94,7 +100,6 @@ def get_interfaces() -> List[Interface]: |
23 |
@@ -87,14 +93,17 @@ def get_interfaces() -> List[Interface]: |
|
|
24 |
t.name, d.vid, d.pid, d.device) |
25 |
iface = Interface('serial', t.name) |
26 |
iface.port = d.device |
27 |
- iface.open() |
28 |
+ try: |
29 |
+ iface.open() |
30 |
+ except serial.SerialException: |
31 |
+ logger.warning("Could not open serial port %s", d.device) |
32 |
+ continue |
33 |
iface.comment = get_comment(iface) |
34 |
iface.close() |
35 |
interfaces.append(iface) |
24 |
|
36 |
|
25 |
logger.debug("Interfaces: %s", interfaces) |
37 |
logger.debug("Interfaces: %s", interfaces) |
26 |
return interfaces |
38 |
return interfaces |