mirror of
https://opendev.org/x/pyghmi
synced 2025-01-28 03:48:09 +00:00
Treat thorn as string terminating
While a thorn in theory could be valid, in practice the more likely intention is yet another nonstandard string termination attempt. Change-Id: I71f837725b1e286b9f94786aa520deb12ce208e4
This commit is contained in:
parent
57d4db40ca
commit
d065f22324
@ -225,7 +225,9 @@ class FRU(object):
|
||||
# strictly speaking, \xff should be a y with diaeresis, but
|
||||
# erring on the side of that not being very relevant in practice
|
||||
# to fru info, particularly the last values
|
||||
retinfo = retinfo.rstrip('\xff\x00 ')
|
||||
# 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 ')
|
||||
if lang in (0, 25):
|
||||
try:
|
||||
retinfo = retinfo.decode('iso-8859-1')
|
||||
|
Loading…
x
Reference in New Issue
Block a user