diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:19:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:20:17 +0000 |
commit | a64a253794ac64cb40befee54db53bde17dd0d49 (patch) | |
tree | c1024acc5f6e508814b944d99f112259bb28b1be /collectors/python.d.plugin/smartd_log/smartd_log.chart.py | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip |
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/python.d.plugin/smartd_log/smartd_log.chart.py (renamed from python.d/smartd_log.chart.py) | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python.d/smartd_log.chart.py b/collectors/python.d.plugin/smartd_log/smartd_log.chart.py index 07ad88cd4..21dbccecc 100644 --- a/python.d/smartd_log.chart.py +++ b/collectors/python.d.plugin/smartd_log/smartd_log.chart.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Description: smart netdata python.d module # Author: l2isbad, vorph1 +# SPDX-License-Identifier: GPL-3.0-or-later import os import re @@ -115,7 +116,7 @@ def chart_template(chart_name): chart_name: { 'options': [None, title, units, family, 'smartd_log.' + chart_name, 'line'], 'lines': [] - } + } } @@ -184,6 +185,12 @@ class Disk: return self.name == other.name return self.name == other + def __ne__(self, other): + return not self == other + + def __hash__(self): + return hash(repr(self)) + @handle_os_error def is_active(self): return (time() - os.path.getmtime(self.log_file.path)) / 60 < self.age |