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