mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-27 15:55:00 +00:00
fix: Handle JSON decode errors when loading results
This commit is contained in:
parent
914ce0b94d
commit
31f8c7d9cb
1 changed files with 7 additions and 4 deletions
|
@ -410,10 +410,13 @@ def show_diffs(dirnames):
|
||||||
|
|
||||||
def load_results(dirname):
|
def load_results(dirname):
|
||||||
dirname = Path(dirname)
|
dirname = Path(dirname)
|
||||||
# handle JSON decode errors, just skip those files. ai!
|
all_results = []
|
||||||
all_results = [
|
for fname in dirname.glob("*/exercises/practice/*/.aider.results.json"):
|
||||||
json.loads(fname.read_text())
|
try:
|
||||||
for fname in dirname.glob("*/exercises/practice/*/.aider.results.json")
|
results = json.loads(fname.read_text())
|
||||||
|
all_results.append(results)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
continue
|
||||||
]
|
]
|
||||||
return all_results
|
return all_results
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue