Browse Source

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)
changes/83/794183/1
Dmitry Tantsur 2 months ago
parent
commit
d18fcb845a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ironic_inspector/plugins/extra_hardware.py

+ 2
- 2
ironic_inspector/plugins/extra_hardware.py 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


Loading…
Cancel
Save