fix: Remove duplicate get_or_create_uuid method

This commit is contained in:
Paul Gauthier (aider) 2024-08-12 20:41:59 -07:00
parent eca7a57138
commit 1567d3e3d1

View file

@ -59,20 +59,6 @@ class Analytics:
"machine": platform.machine(),
}
def get_or_create_uuid(self):
uuid_file = Path.home() / ".aider" / "caches" / "mixpanel.json"
uuid_file.parent.mkdir(parents=True, exist_ok=True)
if uuid_file.exists():
with open(uuid_file, "r") as f:
return json.load(f)["uuid"]
new_uuid = str(uuid.uuid4())
with open(uuid_file, "w") as f:
json.dump({"uuid": new_uuid}, f)
return new_uuid
def event(self, event_name, main_model=None, **kwargs):
if not self.mp and not self.logfile:
return