222 ) |
222 ) |
223 if self.__socket.hasTimedOut(): |
223 if self.__socket.hasTimedOut(): |
224 self.__blockReadyRead = False |
224 self.__blockReadyRead = False |
225 return b"", b"Timeout while processing commands." |
225 return b"", b"Timeout while processing commands." |
226 |
226 |
227 # get rid of any OSD string |
227 # get rid of any OSD string and send it |
228 # TODO: emit the OSD data |
|
229 if result.startswith(b"\x1b]0;"): |
228 if result.startswith(b"\x1b]0;"): |
230 result = result.split(b"\x1b\\")[-1] |
229 osd, result = result.split(b"\x1b\\", 1) |
|
230 self.osdInfo.emit(osd[4:].decode("utf-8")) |
231 |
231 |
232 if self.TracebackMarker in result: |
232 if self.TracebackMarker in result: |
233 errorIndex = result.find(self.TracebackMarker) |
233 errorIndex = result.find(self.TracebackMarker) |
234 out, err = result[:errorIndex], result[errorIndex:].replace(">>> ", "") |
234 out, err = result[:errorIndex], result[errorIndex:].replace(">>> ", "") |
235 else: |
235 else: |