mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[microdecision] Fix interface with meltdown checker script, stdout contains weird debug messages when ran inside LXC :|
This commit is contained in:
parent
2d3ff79683
commit
683d62d0e5
1 changed files with 8 additions and 0 deletions
|
@ -735,6 +735,14 @@ def _check_if_vulnerable_to_meltdown():
|
||||||
output, err = call.communicate()
|
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
|
||||||
|
|
||||||
|
# If there are multiple lines, sounds like there was some messages
|
||||||
|
# in stdout that are not json >.> ... Try to get the actual json
|
||||||
|
# stuff which should be the last line
|
||||||
|
output = output.strip()
|
||||||
|
if "\n" in output:
|
||||||
|
logger.debug("Original meltdown checker output : %s" % output)
|
||||||
|
output = output.split("\n")[-1]
|
||||||
|
|
||||||
CVEs = json.loads(output)
|
CVEs = json.loads(output)
|
||||||
assert len(CVEs) == 1
|
assert len(CVEs) == 1
|
||||||
assert CVEs[0]["NAME"] == "MELTDOWN"
|
assert CVEs[0]["NAME"] == "MELTDOWN"
|
||||||
|
|
Loading…
Add table
Reference in a new issue