diff options
author | slavox <slavox@users.noreply.github.com> | 2021-01-11 16:18:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 19:18:07 +0300 |
commit | 2c389b5a2cec90d18b318d80ac3c748205b72bb6 (patch) | |
tree | 93c13aed38fcf1ee0a9a59870c8e0731baae2377 /collectors/python.d.plugin/hddtemp | |
parent | 503629f6e9ca29b8a6abd5bebd5de52b50a14432 (diff) |
Change HDDtemp to report None instead of 0 (#10429)
Currently the HDD temp plugin reports 0 c when a drive fails to report temp correctly.
changing this to reporting None type resolves this issue and the failures simply leave gaps in the chart.
If the original behavior is preferred for some reason I'd be curious as to why or if there is a better way that doesn't add erroneous data to the chart?
Diffstat (limited to 'collectors/python.d.plugin/hddtemp')
-rw-r--r-- | collectors/python.d.plugin/hddtemp/hddtemp.chart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/hddtemp/hddtemp.chart.py b/collectors/python.d.plugin/hddtemp/hddtemp.chart.py index d89ae2cb7b..6427aa1804 100644 --- a/collectors/python.d.plugin/hddtemp/hddtemp.chart.py +++ b/collectors/python.d.plugin/hddtemp/hddtemp.chart.py @@ -28,7 +28,7 @@ class Disk: def __init__(self, id_, name, temp): self.id = id_.split('/')[-1] self.name = name.replace(' ', '_') - self.temp = temp if temp.isdigit() else 0 + self.temp = temp if temp.isdigit() else None def __repr__(self): return self.id |