summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/smartd_log/smartd_log.chart.py
diff options
context:
space:
mode:
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