@cryptotaxi247 / netdata-1 / commits / c8b4f1901

fix python version check to work for 3.10 and above (#14616)

Andrew Maguire committed Feb 28, 2023 at 10:24 UTC c8b4f19013182b03b6ba727dd784181e1beb8bf9
1 file changed +1 -2
collectors/python.d.plugin/anomalies/anomalies.chart.py
+1 -2
@@ -58,8 +58,7 @@ class Service(SimpleService):
58 self.collected_dims = {'probability': set(), 'anomaly': set()}
59
60 def check(self):
61 - python_version = float('{}.{}'.format(sys.version_info[0], sys.version_info[1]))
62 - if python_version < 3.6:
61 + if not (sys.version_info[0] >= 3 and sys.version_info[1] >= 6):
62 self.error("anomalies collector only works with Python>=3.6")
63 if len(self.host_charts_dict[self.host]) > 0:
64 _ = get_allmetrics_async(host_charts_dict=self.host_charts_dict, protocol=self.protocol, user=self.username, pwd=self.password)