Donate CPU: make server more robust when latest results are missing
This commit is contained in:
parent
a6e8270474
commit
f72847530e
|
@ -55,6 +55,8 @@ def latestReport(latestResults):
|
|||
|
||||
# Write report for latest results
|
||||
for filename in latestResults:
|
||||
if not os.path.isfile(filename):
|
||||
continue
|
||||
package = filename[filename.rfind('/')+1:]
|
||||
|
||||
datestr = ''
|
||||
|
@ -354,6 +356,7 @@ def server(server_address_port, packages, packageIndex, resultPath):
|
|||
sock.listen(1)
|
||||
|
||||
latestResults = []
|
||||
if os.path.isfile('latest.txt'):
|
||||
with open('latest.txt', 'rt') as f:
|
||||
latestResults = f.read().strip().split(' ')
|
||||
|
||||
|
|
Loading…
Reference in New Issue