--- a/eric6/MicroPython/MicroPythonWidget.py Wed Feb 24 20:17:35 2021 +0100 +++ b/eric6/MicroPython/MicroPythonWidget.py Thu Feb 25 17:52:28 2021 +0100 @@ -338,6 +338,10 @@ self.deviceInfoLabel.setText( self.tr("No supported devices detected.")) + self.__unknownPorts = unknownPorts + if self.__unknownPorts: + self.connectButton.setEnabled(True) + index = self.deviceTypeComboBox.findText(currentDevice, Qt.MatchExactly) if index == -1: @@ -397,10 +401,6 @@ yesDefault=True) if yes: self.__addUnknownDevices(list(newUnknownDevices)) - - self.__unknownPorts = unknownPorts - if self.__unknownPorts: - self.connectButton.setEnabled(True) def __handlePreferencesChanged(self): """ @@ -1024,6 +1024,8 @@ self.__lastPort = port self.__lastDeviceType = deviceType + else: + return if self.__interface.connectToDevice(port): self.__setConnected(True)