[fix] wrap 'nginx -t' diagnosis call in try/catch

This commit is contained in:
Laurent Peuch 2018-01-17 18:59:34 +01:00
parent eb38100265
commit 6078e42ed9

View file

@ -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()