221 self.__socket.readUntil(b">>> ", timeout=timeout) |
221 self.__socket.readUntil(b">>> ", timeout=timeout) |
222 .replace(b">>> ", b"") |
222 .replace(b">>> ", b"") |
223 .strip() |
223 .strip() |
224 ) |
224 ) |
225 if self.__socket.hasTimedOut(): |
225 if self.__socket.hasTimedOut(): |
226 out, err = b"", b"Timeout while processing commands." |
226 out, err = b"", b"Timeout while processing commands." |
227 else: |
227 else: |
228 # get rid of any OSD string and send it |
228 # get rid of any OSD string and send it |
229 if result.startswith(b"\x1b]0;"): |
229 if result.startswith(b"\x1b]0;"): |
230 osd, result = result.split(b"\x1b\\", 1) |
230 osd, result = result.split(b"\x1b\\", 1) |
231 self.osdInfo.emit(osd[4:].decode("utf-8")) |
231 self.osdInfo.emit(osd[4:].decode("utf-8")) |