mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Fixed "UnboundLocalError: local variable 'port' referenced before assignment" // Resolve #4407
This commit is contained in:
@ -149,7 +149,7 @@ class SerialPortFinder:
|
|||||||
port = self._reveal_device_port(device)
|
port = self._reveal_device_port(device)
|
||||||
|
|
||||||
# pick the best PID:VID USB device
|
# pick the best PID:VID USB device
|
||||||
best_port = None
|
port = best_port = None
|
||||||
for item in list_serial_ports():
|
for item in list_serial_ports():
|
||||||
if self.ensure_ready and not is_serial_port_ready(item["port"]):
|
if self.ensure_ready and not is_serial_port_ready(item["port"]):
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user