Trivial: better guard against malformed data in extra_hardware

We already catch IndexError when processing a line, but not other
errors. A recent regression in python-hardware caused it to raise
TypeError.

Change-Id: Ic6615c1b4017df66783829e54b9f716a9e65b916
This commit is contained in:
Dmitry Tantsur 2021-05-03 15:41:40 +02:00
parent 08b6c892d7
commit de839a509d

View File

@ -79,8 +79,8 @@ class ExtraHardwareHook(base.ProcessingHook):
pass
converted_1[item[2]] = item[3]
except IndexError:
LOG.warning('Ignoring invalid extra data item %s', item,
except Exception as e:
LOG.warning('Ignoring invalid extra data item %s: %s', item, e,
node_info=node_info, data=introspection_data)
introspection_data['extra'] = converted