From 9144f7443b79b2c57201ad0643d8afbd5d41be6e Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Sun, 11 Aug 2013 17:02:32 +0200 Subject: [PATCH] Correct issue #271 on HDDTemp module --- glances/glances.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glances/glances.py b/glances/glances.py index 3b3f78e1..c1c41d17 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -945,8 +945,14 @@ class glancesGrabHDDTemp: hddtemp_current = {} temperature = fields[offset + 3] if temperature == "ERR": - hddtemp_current['label'] = "hddtemp error" + hddtemp_current['label'] = _("hddtemp error") hddtemp_current['value'] = 0 + elif temperature == "SLP": + hddtemp_current['label'] = fields[offset + 1].split("/")[-1] + " is sleeping" + hddtemp_current['value'] = 0 + elif temperature == "UNK": + hddtemp_current['label'] = fields[offset + 1].split("/")[-1] + " is unknown" + hddtemp_current['value'] = 0 else: hddtemp_current['label'] = fields[offset + 1].split("/")[-1] hddtemp_current['value'] = int(temperature)