# HG changeset patch # User Martin von Zweigbergk # Date 1562884240 25200 # Node ID d9d55e34943c234e852568261c9d0e50626e6dd3 # Parent cdafbd01d0bf9b691a925210fc2766a4935c53c0 py3: avoid comparing int and None diff -r cdafbd01d0bf -r d9d55e34943c hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Thu Jul 11 21:48:37 2019 -0700 +++ b/hgext3rd/evolve/stablerangecache.py Thu Jul 11 15:30:40 2019 -0700 @@ -208,7 +208,11 @@ # 1) check the in memory cache # 2) check the sqlcaches (and warm in memory cache we want we find) cache = self._subrangescache - if rangeid not in cache and rangeid[0] <= self._ondisktiprev and self._con is not None: + if (rangeid not in cache + and self._ondisktiprev is not None + and rangeid[0] <= self._ondisktiprev + and self._con is not None): + value = None try: result = self._con.execute(_queryrange, rangeid).fetchone()