Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: client/isolateserver.py

Issue 2037253002: run_isolated.py: install CIPD packages (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: fix client fetching Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cipd.py ('k') | client/run_isolated.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/isolateserver.py
diff --git a/client/isolateserver.py b/client/isolateserver.py
index 1a679fcfcf1d58f95d3bf03be2e38857be83534c..bde5fc89f8cc46a88e3360841a7df30e6c5d0f15 100755
--- a/client/isolateserver.py
+++ b/client/isolateserver.py
@@ -1218,6 +1218,9 @@ class LocalCache(object):
self._evicted = []
self._linked = []
+ def __contains__(self, digest):
+ raise NotImplementedError()
+
def __enter__(self):
"""Context manager interface."""
return self
@@ -1302,6 +1305,10 @@ class MemoryCache(LocalCache):
self._file_mode_mask = file_mode_mask
self._contents = {}
+ def __contains__(self, digest):
+ with self._lock:
+ return digest in self._contents
+
def cached_set(self):
with self._lock:
return set(self._contents)
@@ -1395,6 +1402,10 @@ class DiskCache(LocalCache):
# self._load() calls self._trim() which initializes self._free_disk.
self._load()
+ def __contains__(self, digest):
+ with self._lock:
+ return digest in self._lru
+
def __enter__(self):
return self
« no previous file with comments | « client/cipd.py ('k') | client/run_isolated.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698