donate-cpu-server.py: Fixed bug

This commit is contained in:
Daniel Marjamäki 2019-06-30 14:14:02 +02:00
parent c9db395d43
commit 098144fbe8
1 changed files with 2 additions and 1 deletions

View File

@ -249,7 +249,8 @@ def diffReport(resultsPath):
with open(filename, 'rt') as f: with open(filename, 'rt') as f:
data = json.loads(f.read()) data = json.loads(f.read())
uploadedToday = data['date'] == today uploadedToday = data['date'] == today
for messageId, sums in data['sums']: for messageId in data['sums']:
sums = data['sums'][messageId]
if messageId not in out: if messageId not in out:
out[messageId] = [0, 0] out[messageId] = [0, 0]
out[messageId][0] += sums[OLD_VERSION] out[messageId][0] += sums[OLD_VERSION]