py3: avoid comparing int and None
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 11 Jul 2019 15:30:40 -0700
changeset 4750 d9d55e34943c
parent 4749 cdafbd01d0bf
child 4752 8a73a8df63b6
py3: avoid comparing int and None
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()