              num_bytes = 1024
              while True:
                  try:
                      from_pty = proc.read(num_bytes)
                  except winpty.WinptyError as err:
                      if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                          # Get remaining bytes. On a comms error, the buffer remains unread so keep
                          # halving buffer amount until down to 1 when we know we have everything
                          if num_bytes == 1:
                              eof = True
                          from_pty = ""
                          num_bytes //= 2
                      else:
                          raise
                  out += from_pty
                  if "\n" in out:
                      lines.extend(out.split("\n"))
                      if out.endswith("\n") or eof:  # Ends on newline or is EOF
                          out = ""
 
</s> remove                         logger.verbose(line)  # type:ignore
 </s> add                         if line not in seen_lines:
                            # Supress repeat "waiting" lines from spamming the logfile
                            logger.verbose(line)  # type:ignore
                            seen_lines.add(line)
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
              num_bytes = 1024
              while True:
                  try:
                      from_pty = proc.read(num_bytes)
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                except winpty.WinptyError:
                    # TODO Reinsert this check
                    # The error message "pipe has been ended" is language specific so this check
                    # fails on non english systems. For now we just swallow all errors until no
                    # bytes are left to read and then check the return code
                    # if any(val in str(err) for val in ["EOF", "pipe has been ended"]):
                    #    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    #    # halving buffer amount until down to 1 when we know we have everything
                    #     if num_bytes == 1:
                    #         eof = True
                    #     from_pty = ""
                    #     num_bytes //= 2
                    # else:
                    #     raise

                    # Get remaining bytes. On a comms error, the buffer remains unread so keep
                    # halving buffer amount until down to 1 when we know we have everything
                    if num_bytes == 1:
                        eof = True
                    from_pty = ""
                    num_bytes //= 2
                  out += from_pty
                  if "\n" in out:
                      lines.extend(out.split("\n"))
                      if out.endswith("\n") or eof:  # Ends on newline or is EOF
                          out = ""
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 bugfix: setup.py
  - Windows - Don't fail + fallback install on non-english systems
  - Windows - Suppress duplicate waiting messages 
setup.py