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:
parent
adb7f20797
commit
164a46f8cd
|
@ -67,7 +67,8 @@ def latestReport(latestResults):
|
||||||
added = 0
|
added = 0
|
||||||
for line in open(filename,'rt'):
|
for line in open(filename,'rt'):
|
||||||
line = line.strip()
|
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
|
datestr = line
|
||||||
#elif line.startswith('cppcheck:'):
|
#elif line.startswith('cppcheck:'):
|
||||||
# cppcheck = line[9:]
|
# cppcheck = line[9:]
|
||||||
|
|
Loading…
Reference in New Issue