From 4404b537fd9656280d1ef1bd12d601225933566d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 17 May 2018 13:05:40 -0400 Subject: [PATCH] Error on invalid signature Provide a more informative error when faced with an invalid firmware signature on upload. Change-Id: Ifdc6ae546270509e80c260584951427396b7230e --- pyghmi/ipmi/oem/lenovo/nextscale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index a795a8e3..155ccd4c 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -426,6 +426,8 @@ class SMMClient(object): if rsp.status != 200: raise Exception('Error applying firmware') progdata = fromstring(progdata) + if progdata.findall('fwUpdate')[0].text == 'invalid signature': + raise Exception('Firmware signature invalid') percent = float(progdata.findall('fwProgress')[0].text) progress({'phase': 'apply',