Skip to content

Commit

Permalink
Merge pull request yosupo06#1166 from HeRaNO/fix-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
yosupo06 authored May 26, 2024
2 parents ea3837e + 1fb48fb commit 75bcb9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def test_generate_all(self):
tomls = sorted(tomls, key=lambda x: x.parent.name)

cache_path = Path(getenv('VERSIONS_CACHE_PATH'))
with open(cache_path, 'r') as cache_file:
versions = json.load(cache_file) if cache_path.exists() else dict()
versions = dict()
if cache_path.exists():
with open(cache_path, 'r') as cache_file:
versions = json.load(cache_file)

for toml in tomls:
problem = Problem(Path.cwd(), toml.parent)
Expand Down

0 comments on commit 75bcb9d

Please sign in to comment.