From 2367c85f2580bb05262115b22af11960ca942566 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 26 Oct 2018 15:07:45 -0400 Subject: [PATCH] Preserve logout on storage failure If the storage call should fail, carry on logic to allow the situation to clean out. Change-Id: I325c0870bdc2ff358ed872697c15b5963ca836a0 --- pyghmi/ipmi/oem/lenovo/imm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index c8bf460d..e5b2fa93 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1089,7 +1089,7 @@ class XCCClient(IMMClient): '/api/function/raid_alldevices?params=storage_GetAllDevices') standalonedisks = [] pools = [] - for item in rsp['items']: + for item in rsp.get('items', []): for cinfo in item['controllerInfo']: cid = cinfo['id'] for pool in cinfo['pools']: