src/eric7/MicroPython/MicroPythonCommandsInterface.py

branch
eric7
changeset 9764
57496966803c
parent 9760
11245ac9c258
--- a/src/eric7/MicroPython/MicroPythonCommandsInterface.py	Tue Feb 14 10:05:29 2023 +0100
+++ b/src/eric7/MicroPython/MicroPythonCommandsInterface.py	Tue Feb 14 11:09:49 2023 +0100
@@ -274,8 +274,8 @@
                 else:
                     err = b"invalid response received: " + response
                 if err:
-                    self.__blockReadyRead = False
-                    return b"", err
+                    result = b""
+                    break
 
         # switch off raw mode
         QThread.msleep(10)
@@ -293,14 +293,10 @@
         @type list of bytes
         """
 
-        def remainingTask(commands):
-            self.executeAsync(commands)
-
         if commandsList:
-            command = commandsList[0]
+            command = commandsList.pop(0)
             self.__serial.write(command)
-            remainder = commandsList[1:]
-            QTimer.singleShot(2, lambda: remainingTask(remainder))
+            QTimer.singleShot(2, lambda: self.executeAsync(commandsList))
         else:
             self.executeAsyncFinished.emit()
 

eric ide

mercurial