From ace29963d63adc6906481c2f8dcf3a4c962f47ef Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 25 Jul 2019 12:45:51 -0400 Subject: [PATCH] Graceful error on no https in get_health Rather than timeout, provide a more informative health message. Change-Id: Ideb0d86c84a4e702ad38a4d5a1ac51c6e610b57d --- pyghmi/ipmi/oem/lenovo/imm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 7d9d392f..1fa48281 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1728,7 +1728,10 @@ class XCCClient(IMMClient): break def get_health(self, summary): - wc = self.get_webclient(False) + try: + wc = self.get_webclient(False) + except Exception: + wc = None if not wc: summary['health'] = pygconst.Health.Critical; summary['badreadings'].append(