Ignore stderr from meltdown checker

This commit is contained in:
Alexandre Aubin 2019-01-30 19:23:36 +01:00
parent 4a7e33a145
commit d95931c8f1

View file

@ -725,9 +725,14 @@ def _check_if_vulnerable_to_meltdown():
call = subprocess.Popen("bash %s --batch json --variant 3" % call = subprocess.Popen("bash %s --batch json --variant 3" %
SCRIPT_PATH, shell=True, SCRIPT_PATH, shell=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT) stderr=subprocess.PIPE)
output, _ = call.communicate() # TODO / FIXME : here we are ignoring error messages ...
# in particular on RPi2 and other hardware, the script complains about
# "missing some kernel info (see -v), accuracy might be reduced"
# Dunno what to do about that but we probably don't want to harass
# users with this warning ...
output, err = call.communicate()
assert call.returncode in (0, 2, 3), "Return code: %s" % call.returncode assert call.returncode in (0, 2, 3), "Return code: %s" % call.returncode
CVEs = json.loads(output) CVEs = json.loads(output)