--- a/eric6/MicroPython/EspDevices.py Thu Apr 08 17:27:12 2021 +0200 +++ b/eric6/MicroPython/EspDevices.py Thu Apr 08 18:27:47 2021 +0200 @@ -202,13 +202,15 @@ dlg = EspFirmwareSelectionDialog() if dlg.exec() == QDialog.DialogCode.Accepted: chip, firmware, baudRate, flashMode, _ = dlg.getData() + if chip not in ("esp8266", "esp32"): + raise ValueError(self.tr("Unsupported chip type '{0}'.") + .format(chip)) + if chip == "esp8266": flashAddress = "0x0000" elif chip == "esp32": flashAddress = "0x1000" - else: - raise ValueError(self.tr("Unsupported chip type '{0}'.") - .format(chip)) + flashArgs = [ "-u", "-m", "esptool",