donate-cpu-server.py: Fix date/time in report is not found. (#1562)

Instead of searching for a specific year (which could change) the script searches now for the current and last year to find the date and time information in the results.
This commit is contained in:
Sebastian 2019-01-04 11:51:32 +01:00 committed by amai2012
parent adb7f20797
commit 164a46f8cd
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ def latestReport(latestResults):
added = 0
for line in open(filename,'rt'):
line = line.strip()
if line.startswith('2018-'):
current_year = datetime.date.today().year
if line.startswith(str(current_year) + '-') or line.startswith(str(current_year - 1) + '-'):
datestr = line
#elif line.startswith('cppcheck:'):
# cppcheck = line[9:]