Fix attribute value colors

This commit is contained in:
2Shirt 2019-10-28 20:57:34 -06:00
parent ae5e9b8f34
commit 117df6158a
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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?)'