summaryrefslogtreecommitdiffstats
path: root/core/views/statistics.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r--core/views/statistics.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py
index d18ca57..ebe70dd 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -82,11 +82,16 @@ def therionissues(request):
newlog = []
if Path(logpath).is_file:
- with open(logpath, "r") as f:
- therionlog = f.readlines()
- print(f"{logpath} has {len(therionlog)} entries")
+ try:
+ with open(logpath, "r") as f:
+ therionlog = f.readlines()
+ print(f"{logpath} has {len(therionlog)} entries")
+ except:
+ msg = f"{logpath} EXCEPTION opening or reading therion logfile. Run a full reset."
+ print(msg)
+ return render(request, "therionreport.html", {"therionlog": newlog})
else:
- print(f"{logpath} NOT FOUND {len(therionlog)}")
+ print(f"{logpath} NOT FOUND: {len(therionlog)} entries")
for line in therionlog:
line = line.replace("! Un-parsed image filename:", "")