Mercurial > hg
changeset 30687:5d06f6b73a57
keepalive: remove limit argument from readline()
It is unused and adds complexity.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 07 Oct 2015 15:53:58 -0700 |
parents | 8352c42a0a0d |
children | dc5b594f41e9 |
files | mercurial/keepalive.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/keepalive.py Wed Oct 07 15:33:52 2015 -0700 +++ b/mercurial/keepalive.py Wed Oct 07 15:53:58 2015 -0700 @@ -451,9 +451,9 @@ return ''.join(parts) - def readline(self, limit=-1): + def readline(self): i = self._rbuf.find('\n') - while i < 0 and not (0 < limit <= len(self._rbuf)): + while i < 0: new = self._raw_read(self._rbufsize) if not new: break @@ -465,8 +465,6 @@ i = len(self._rbuf) else: i = i + 1 - if 0 <= limit < len(self._rbuf): - i = limit data, self._rbuf = self._rbuf[:i], self._rbuf[i:] return data