diff -r 1ba9d07ba9da -r 286c2a21f36f src/eric7/MicroPython/Devices/GenericMicroPythonDevices.py --- a/src/eric7/MicroPython/Devices/GenericMicroPythonDevices.py Mon Apr 24 17:51:11 2023 +0200 +++ b/src/eric7/MicroPython/Devices/GenericMicroPythonDevices.py Thu Apr 27 17:59:09 2023 +0200 @@ -249,7 +249,7 @@ Private slot to switch the board into 'bootloader' mode. """ if self.microPython.isConnected(): - self.microPython.deviceInterface().execute( + self.executeCommands( "import machine\nmachine.bootloader()\n", mode=self._submitMode ) # simulate pressing the disconnect button @@ -334,11 +334,12 @@ """ Private slot to reset the connected device. """ - self.microPython.deviceInterface().execute( - "import machine\nmachine.reset()\n", mode=self._submitMode - ) - # simulate pressing the disconnect button - self.microPython.on_connectButton_clicked() + if self.microPython.isConnected(): + self.executeCommands( + "import machine\nmachine.reset()\n", mode=self._submitMode + ) + # simulate pressing the disconnect button + self.microPython.on_connectButton_clicked() def getDocumentationUrl(self): """