From 79abbcfaf89268b4f7c0ef6aa63004b6c265fff0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 22 Jan 2020 11:20:39 -0700 Subject: [PATCH] Avoid crash when getting NVMe attributes --- scripts/wk/hw/obj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wk/hw/obj.py b/scripts/wk/hw/obj.py index 1facbc15..a9e8cd57 100644 --- a/scripts/wk/hw/obj.py +++ b/scripts/wk/hw/obj.py @@ -539,7 +539,7 @@ class Disk(BaseObj): 'raw': int(value), 'raw_str': str(value), } - except ValueError: + except (TypeError, ValueError): # Ignoring invalid attribute LOG.error('Invalid NVMe attribute: %s %s', name, value) elif KEY_SMART in self.smartctl: