# HG changeset patch # User Gregory Szorc # Date 2015-10-07 22:53:58 # Node ID 5d06f6b73a5727c9a993f493eb0d694229bd13ae # Parent 8352c42a0a0d1c2cf77b22cb3a80562656dee1d5 keepalive: remove limit argument from readline() It is unused and adds complexity. diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py --- a/mercurial/keepalive.py +++ b/mercurial/keepalive.py @@ -451,9 +451,9 @@ class HTTPResponse(httplib.HTTPResponse) 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 @@ class HTTPResponse(httplib.HTTPResponse) 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