2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 03:37:47 +00:00

If no u-height, revert to default behavior

Change-Id: I94dd5c8dd5b535c39b4b3df579961620e470c31b
This commit is contained in:
Jarrod Johnson 2019-04-11 17:15:14 -04:00
parent 7004a1a4c5
commit 9e51f88a20

View File

@ -786,6 +786,8 @@ class XCCClient(IMMClient):
def get_description(self):
dsc = self.wc.grab_json_response('/DeviceDescription.json')
dsc = dsc[0]
if not dsc.get('u-height', None):
return {}
return {'height': int(dsc['u-height']), 'slot': int(dsc['slot'])}
def clear_system_configuration(self):