Fix history script

This commit is contained in:
root 2020-11-07 18:00:36 +00:00
parent ca5852c85f
commit 590d6b9524

View file

@ -95,17 +95,17 @@ def make_count_summary():
infos = j.get(app, {}) infos = j.get(app, {})
if not infos or infos.get("state") not in ["working", "official"]: if not infos or infos.get("state") not in ["working", "official"]:
level = -1 level = 0
else: else:
level = infos.get("level", -1) level = infos.get("level", 0)
try: try:
level = int(level) level = int(level)
except: except:
level = -1 level = 0
history_per_app[app].append({ history_per_app[app].append({
"date": d_label, "date": d_label,
"level": infos.get("level", -1) "level": level
}) })
json.dump(history, open('count_history.json', 'w')) json.dump(history, open('count_history.json', 'w'))