Donate CPU: Fix old path

This commit is contained in:
Daniel Marjamäki 2018-08-27 18:44:17 +02:00
parent 4002fcd3e3
commit ec5a13d351
1 changed files with 3 additions and 4 deletions

View File

@ -140,10 +140,10 @@ def diffReport():
return html return html
def diffMessageIdReport(messageId): def diffMessageIdReport(resultPath, messageId):
text = messageId + '\n' text = messageId + '\n'
e = '[' + messageId + ']\n' e = '[' + messageId + ']\n'
for filename in sorted(glob.glob(os.path.expanduser('~/donated-results/*'))): for filename in sorted(glob.glob(resultPath + '/*')):
url = None url = None
diff = False diff = False
for line in open(filename,'rt'): for line in open(filename,'rt'):
@ -203,8 +203,7 @@ class HttpClientThread(Thread):
httpGetResponse(self.connection, html, 'text/html') httpGetResponse(self.connection, html, 'text/html')
elif url.startswith('diff-'): elif url.startswith('diff-'):
messageId = url[5:] messageId = url[5:]
text = diffMessageIdReport(messageId) text = diffMessageIdReport(self.resultPath, messageId)
print(text)
httpGetResponse(self.connection, text, 'text/plain') httpGetResponse(self.connection, text, 'text/plain')
else: else:
filename = resultPath + '/' + url filename = resultPath + '/' + url