Add safe guards for logging

This commit is contained in:
Mykola Grymalyuk
2023-06-02 12:11:32 -06:00
parent 1ef98e0a4b
commit cada66a6b5
2 changed files with 7 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ class Analytics:
return
if not log_file.exists():
return
if self.constants.commit_info[0].startswith("refs/tags"):
# Avoid being overloaded with crash reports
return
commit_info = self.constants.commit_info[0].split("/")[-1] + "_" + self.constants.commit_info[1].split("T")[0] + "_" + self.constants.commit_info[2].split("/")[-1]