--- a/src/eric7/MicroPython/MicroPythonSerialDeviceInterface.py Tue May 16 14:36:05 2023 +0200 +++ b/src/eric7/MicroPython/MicroPythonSerialDeviceInterface.py Tue May 16 14:36:37 2023 +0200 @@ -312,8 +312,8 @@ # read until prompt response = self.__serial.readUntil(b"\x04>", timeout=timeout) if self.__serial.hasTimedOut(): - self.__blockReadyRead = False - return b"", b"Timeout while processing commands." + out, err = b"", b"Timeout while processing commands." + break if b"\x04" in response[:-2]: # split stdout, stderr out, err = response[:-2].split(b"\x04") @@ -392,20 +392,19 @@ .strip() ) if self.__serial.hasTimedOut(): - self.__blockReadyRead = False - return b"", b"Timeout while processing commands." + out, err = b"", b"Timeout while processing commands." + else: + # get rid of any OSD string and send it + if result.startswith(b"\x1b]0;"): + osd, result = result.split(b"\x1b\\", 1) + self.osdInfo.emit(osd[4:].decode("utf-8")) - # get rid of any OSD string and send it - if result.startswith(b"\x1b]0;"): - osd, result = result.split(b"\x1b\\", 1) - self.osdInfo.emit(osd[4:].decode("utf-8")) - - if self.TracebackMarker in result: - errorIndex = result.find(self.TracebackMarker) - out, err = result[:errorIndex], result[errorIndex:] - else: - out = result - err = b"" + if self.TracebackMarker in result: + errorIndex = result.find(self.TracebackMarker) + out, err = result[:errorIndex], result[errorIndex:] + else: + out = result + err = b"" self.__blockReadyRead = False return out, err