More error resilience when logging success/failure of prints

This commit is contained in:
Gina Häußge 2014-12-11 18:32:17 +01:00
parent 11c415fd17
commit 85a567bdab

View file

@ -89,9 +89,9 @@ def _getFileList(origin, filter=None):
failure = 0
last = None
for entry in history:
success += 1 if entry["success"] else 0
failure += 1 if not entry["success"] else 0
if not last or entry["timestamp"] > last["timestamp"]:
success += 1 if "success" in entry and entry["success"] else 0
failure += 1 if "success" in entry and not entry["success"] else 0
if not last or ("timestamp" in entry and "timestamp" in last and entry["timestamp"] > last["timestamp"]):
last = entry
if last:
prints = dict(