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
(cherry picked from commit de839a509d)
This commit is contained in:
Dmitry Tantsur 2021-05-03 15:41:40 +02:00
parent 579f59ca63
commit d18fcb845a
1 changed files with 2 additions and 2 deletions

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