From ec5a13d351b1126969937fb2ad0e8047706e4f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 27 Aug 2018 18:44:17 +0200 Subject: [PATCH] Donate CPU: Fix old path --- tools/donate-cpu-server.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/donate-cpu-server.py b/tools/donate-cpu-server.py index 002e38c1a..1b4465965 100644 --- a/tools/donate-cpu-server.py +++ b/tools/donate-cpu-server.py @@ -140,10 +140,10 @@ def diffReport(): return html -def diffMessageIdReport(messageId): +def diffMessageIdReport(resultPath, messageId): text = 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 diff = False for line in open(filename,'rt'): @@ -203,8 +203,7 @@ class HttpClientThread(Thread): httpGetResponse(self.connection, html, 'text/html') elif url.startswith('diff-'): messageId = url[5:] - text = diffMessageIdReport(messageId) - print(text) + text = diffMessageIdReport(self.resultPath, messageId) httpGetResponse(self.connection, text, 'text/plain') else: filename = resultPath + '/' + url