From a58449ad51ff8aae85d6069033a99488894fccbb Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 17 Jan 2018 18:59:48 +0100 Subject: [PATCH] [fix] wrap 'meltdown' diagnosis call in try/catch --- src/yunohost/tools.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index c209254b8..d6d288108 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -637,12 +637,17 @@ def tools_diagnosis(auth, private=False): diagnosis['private']['regen_conf'] = service_regen_conf(with_diff=True, dry_run=True) - diagnosis['security'] = { - "CVE-2017-5754": { - "name": "meltdown", - "vulnerable": _check_if_vulnerable_to_meltdown(), + try: + diagnosis['security'] = { + "CVE-2017-5754": { + "name": "meltdown", + "vulnerable": _check_if_vulnerable_to_meltdown(), + } } - } + except Exception as e: + import traceback + traceback.print_exc() + logger.warning("Unable to check for meltdown vulnerability: %s" % e) return diagnosis