From 6078e42ed97863680a304a1a0800e7546afd6386 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 17 Jan 2018 18:59:34 +0100 Subject: [PATCH] [fix] wrap 'nginx -t' diagnosis call in try/catch --- src/yunohost/tools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 8b6e5cc44..c209254b8 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -593,7 +593,12 @@ def tools_diagnosis(auth, private=False): } # nginx -t - diagnosis['nginx'] = check_output("nginx -t").strip().split("\n") + try: + diagnosis['nginx'] = check_output("nginx -t").strip().split("\n") + except Exception as e: + import traceback + traceback.print_exc() + logger.warning("Unable to check 'nginx -t', exception: %s" % e) # Services status services = service_status()