392 ) |
392 ) |
393 if self.__serial.hasTimedOut(): |
393 if self.__serial.hasTimedOut(): |
394 out, err = b"", b"Timeout while processing commands." |
394 out, err = b"", b"Timeout while processing commands." |
395 else: |
395 else: |
396 # get rid of any OSD string and send it |
396 # get rid of any OSD string and send it |
397 if result.startswith(b"\x1b]0;"): |
397 while result.startswith(b"\x1b]0;"): |
398 osd, result = result.split(b"\x1b\\", 1) |
398 osd, result = result.split(b"\x1b\\", 1) |
399 self.osdInfo.emit(osd[4:].decode("utf-8")) |
399 self.osdInfo.emit(osd[4:].decode("utf-8")) |
400 |
400 |
401 if self.TracebackMarker in result: |
401 if self.TracebackMarker in result: |
402 errorIndex = result.find(self.TracebackMarker) |
402 errorIndex = result.find(self.TracebackMarker) |