From be14517bcd65788d3311937900eb33cefb6ea4f0 Mon Sep 17 00:00:00 2001 From: versat Date: Thu, 17 Jan 2019 14:58:15 +0100 Subject: [PATCH] donate-cpu.py: Fix too few return values in scanPackage() In case a crash is detected the scanPackage() function returns too few values (three instead of four). This likely leads to an exception then. --- tools/donate-cpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index 91c74da85..ce0038935 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -237,11 +237,11 @@ def scanPackage(workPath, cppcheck, jobs): if p.returncode != 0 and 'cppcheck: error: could not find or open any of the paths given.' not in stdout: # Crash! print('Crash!') - return -1, '', -1 + return -1, '', -1, options if stderr.find('Internal error: Child process crashed with signal 11 [cppcheckError]') > 0: # Crash! print('Crash!') - return -1, '', -1 + return -1, '', -1, options elapsedTime = stopTime - startTime count = 0 for line in stderr.split('\n'):