Mercurial > hg
comparison mercurial/keepalive.py @ 34331:531332502568
style: always use `x is not None` instead of `not x is None`
Differential Revision: https://phab.mercurial-scm.org/D842
author | Alex Gaynor <agaynor@mozilla.com> |
---|---|
date | Fri, 29 Sep 2017 15:49:43 +0000 |
parents | 9bd003052d55 |
children | a454123f5d94 |
comparison
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] |