mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fix: add error handling for logfile writes in Analytics
This commit is contained in:
parent
c51afc952c
commit
699e283890
1 changed files with 6 additions and 4 deletions
|
@ -219,7 +219,9 @@ class Analytics:
|
||||||
"user_id": self.user_id,
|
"user_id": self.user_id,
|
||||||
"time": int(time.time()),
|
"time": int(time.time()),
|
||||||
}
|
}
|
||||||
# ai try/except OsErrors, ignore them AI!
|
try:
|
||||||
with open(self.logfile, "a") as f:
|
with open(self.logfile, "a") as f:
|
||||||
json.dump(log_entry, f)
|
json.dump(log_entry, f)
|
||||||
f.write("\n")
|
f.write("\n")
|
||||||
|
except OSError:
|
||||||
|
pass # Ignore OS errors when writing to logfile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue