From 117df6158af8ad72f4477054a15d956470ea2831 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 28 Oct 2019 20:57:34 -0600 Subject: [PATCH] Fix attribute value colors --- scripts/wk/hw/obj.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/wk/hw/obj.py b/scripts/wk/hw/obj.py index 3330f7f7..2c0cb54c 100644 --- a/scripts/wk/hw/obj.py +++ b/scripts/wk/hw/obj.py @@ -158,7 +158,8 @@ class Disk(): # Value color for threshold, color in ATTRIBUTE_COLORS: - if value['raw'] >= ATTRIBUTES.get(threshold, float('inf')): + threshold_val = ATTRIBUTES.get(attr, {}).get(threshold, float('inf')) + if threshold_val and value['raw'] >= threshold_val: value_color = color if threshold == 'Maximum': note = '(invalid?)'