From 50af75074e4b85b39f140857d2eb817c604a1f07 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 26 Aug 2011 08:56:25 -0400 Subject: fixed comparisons for probe data --- src/lib/Server/Plugins/Probes.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/Server/Plugins/Probes.py b/src/lib/Server/Plugins/Probes.py index ec0f294dd..1609a407e 100644 --- a/src/lib/Server/Plugins/Probes.py +++ b/src/lib/Server/Plugins/Probes.py @@ -61,6 +61,24 @@ class ProbeData (object): def __float__(self): return float(self.data) + def __eq__(self, other): + return str(self) == str(other) + + def __ne__(self, other): + return str(self) != str(other) + + def __gt__(self, other): + return str(self) > str(other) + + def __lt__(self, other): + return str(self) < str(other) + + def __ge__(self, other): + return self > other or self == other + + def __le__(self, other): + return self < other or self == other + @property def xdata(self): if self._xdata is None: -- cgit v1.2.3-1-g7c22