mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05: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):
|
||||
dirname = Path(dirname)
|
||||
# handle JSON decode errors, just skip those files. ai!
|
||||
all_results = [
|
||||
json.loads(fname.read_text())
|
||||
for fname in dirname.glob("*/exercises/practice/*/.aider.results.json")
|
||||
all_results = []
|
||||
for fname in dirname.glob("*/exercises/practice/*/.aider.results.json"):
|
||||
try:
|
||||
results = json.loads(fname.read_text())
|
||||
all_results.append(results)
|
||||
except json.JSONDecodeError:
|
||||
continue
|
||||
]
|
||||
return all_results
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue