Commit 1c83605f authored by rob's avatar rob Committed by Commit bot

bisect-builds.py: Save cache in parent scope

Using 'cache = ...' always assigns ... to the local scope, while it
should be stored in the parent scope instead. Because of this oversight,
the cache only contained one list of revisions at any time, namely the
list of revisions for the current settings (e.g. "-a linux64" or "-l -a
linux64").
This patch fixed the issue by iterating over the cached dictionary and
copying the keys and values to the variable (in the parent scope).

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1131403003

Cr-Commit-Position: refs/heads/master@{#330374}
parent 817c8dc8
......@@ -444,7 +444,8 @@ class PathContext(object):
if self.use_local_cache:
try:
with open(cache_filename) as cache_file:
cache = json.load(cache_file)
for (key, value) in json.load(cache_file).items():
cache[key] = value
revisions = cache.get(cache_dict_key, [])
githash_svn_dict = cache.get('githash_svn_dict', {})
if revisions:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment