From 9eeaff7a8a1b7dbbd5f9cbbbc840cc2106069877 Mon Sep 17 00:00:00 2001 From: Mengyang Li Date: Thu, 29 Oct 2020 15:12:51 -0700 Subject: [PATCH] fru: add chassis type 0: Unspecified Some pre-production boards has chassis type with value 0, ipmitool is reporting that as "Unspecified" while pyghmi will crash Change-Id: I45304db6e01281bbc53e013648ac6d940855e5d2 ref: https://github.com/ipmitool/ipmitool/blob/1245aaa387dca1cb99408869b2c1b3e2410a1352/lib/ipmi_fru.c#L72 --- pyghmi/ipmi/fru.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyghmi/ipmi/fru.py b/pyghmi/ipmi/fru.py index 0b132510..87ea9583 100644 --- a/pyghmi/ipmi/fru.py +++ b/pyghmi/ipmi/fru.py @@ -42,6 +42,7 @@ fruepoch = 820454400 # 1/1/1996, 0:00 # This is from SMBIOS specification Table 16 enclosure_types = { + 0: 'Unspecified', 1: 'Other', 2: 'Unknown', 3: 'Desktop',