21020: Make arvados.api.http_cache get a path from the environment
[arvados.git] / sdk / python / arvados / diskcache.py
index 22bf73894b8fd8d9d1a1270de1973481a937dc51..528a7d28b58146af1a33eac0ada4b746a9eaa12d 100644 (file)
@@ -106,7 +106,7 @@ class DiskCacheSlot(object):
             return len(self.content)
 
     def evict(self):
-        if self.content is None or len(self.content) == 0:
+        if not self.content:
             return
 
         # The mmap region might be in use when we decided to evict
@@ -244,7 +244,7 @@ class DiskCacheSlot(object):
 
         # Map in all the files we found, up to maxslots, if we exceed
         # maxslots, start throwing things out.
-        cachelist = collections.OrderedDict()
+        cachelist: collections.OrderedDict = collections.OrderedDict()
         for b in blocks:
             got = DiskCacheSlot.get_from_disk(b[0], cachedir)
             if got is None: