mercurial/keepalive.py
changeset 34331 531332502568
parent 34308 9bd003052d55
child 34427 a454123f5d94
equal deleted inserted replaced
34330:89aec1834a86 34331:531332502568
   391         return self._url
   391         return self._url
   392 
   392 
   393     def read(self, amt=None):
   393     def read(self, amt=None):
   394         # the _rbuf test is only in this first if for speed.  It's not
   394         # the _rbuf test is only in this first if for speed.  It's not
   395         # logically necessary
   395         # logically necessary
   396         if self._rbuf and not amt is None:
   396         if self._rbuf and amt is not None:
   397             L = len(self._rbuf)
   397             L = len(self._rbuf)
   398             if amt > L:
   398             if amt > L:
   399                 amt -= L
   399                 amt -= L
   400             else:
   400             else:
   401                 s = self._rbuf[:amt]
   401                 s = self._rbuf[:amt]