From db1a87f7b1a954216e3fcd1a66eb1b213b3fbde5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 1 Mar 2019 13:04:17 -0500 Subject: [PATCH] Add 0x10 and 0x03 to ignore These bytes have also appeared erroneously in FRU data, treat them as equivalent to null. Change-Id: I9d19239f2dc13fc47321c8a35f25c58ccbebec3d --- pyghmi/ipmi/fru.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/fru.py b/pyghmi/ipmi/fru.py index cf4c4195..6a158644 100644 --- a/pyghmi/ipmi/fru.py +++ b/pyghmi/ipmi/fru.py @@ -227,7 +227,7 @@ class FRU(object): # to fru info, particularly the last values # Additionally 0xfe has been observed, which should be a thorn, but # again assuming termination of string is more likely than thorn. - retinfo = retinfo.rstrip('\xfe\xff\x00 ') + retinfo = retinfo.rstrip('\xfe\xff\x10\x03\x00 ') if lang in (0, 25): try: retinfo = retinfo.decode('iso-8859-1')