2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

fix error in test suite when full reset has not been done

This commit is contained in:
Philip Sargent 2023-08-25 21:49:05 +03:00
parent 3d51588cc1
commit f2a76da7e2

View File

@ -82,11 +82,16 @@ def therionissues(request):
newlog = [] newlog = []
if Path(logpath).is_file: if Path(logpath).is_file:
with open(logpath, "r") as f: try:
therionlog = f.readlines() with open(logpath, "r") as f:
print(f"{logpath} has {len(therionlog)} entries") 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: else:
print(f"{logpath} NOT FOUND {len(therionlog)}") print(f"{logpath} NOT FOUND: {len(therionlog)} entries")
for line in therionlog: for line in therionlog:
line = line.replace("! Un-parsed image filename:", "") line = line.replace("! Un-parsed image filename:", "")