donate-cpu-server.py: Fix package names in time output. (#1570)

The package names contained the whole path, so the leading "resultPath" is now removed to only show the package names.
Tested on local server.
This commit is contained in:
Sebastian 2019-01-07 19:31:34 +01:00 committed by GitHub
parent 7a59949cb4
commit 30d53a911e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -270,9 +270,9 @@ def timeReport(resultPath):
totalTime184 += t184
totalTimeHead += thead
if t184>1 and t184*2 < thead:
text += filename[filename.find('/')+1:] + ' ' + splitline[2] + ' ' + splitline[1] + '\n'
text += filename[len(resultPath)+1:] + ' ' + splitline[2] + ' ' + splitline[1] + '\n'
elif thead>1 and thead*2 < t184:
text += filename[filename.find('/')+1:] + ' ' + splitline[2] + ' ' + splitline[1] + '\n'
text += filename[len(resultPath)+1:] + ' ' + splitline[2] + ' ' + splitline[1] + '\n'
break
text += '\nTotal time: ' + str(totalTime184) + ' ' + str(totalTimeHead)