diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-08-26 08:56:25 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-08-26 08:56:25 -0400 |
commit | 50af75074e4b85b39f140857d2eb817c604a1f07 (patch) | |
tree | 77ac12094c0536c26e129f86523d2952db3c429c | |
parent | cb8b988774c573bb8f6840aa60be0ced60323940 (diff) | |
download | bcfg2-50af75074e4b85b39f140857d2eb817c604a1f07.tar.gz bcfg2-50af75074e4b85b39f140857d2eb817c604a1f07.tar.bz2 bcfg2-50af75074e4b85b39f140857d2eb817c604a1f07.zip |
fixed comparisons for probe data
-rw-r--r-- | src/lib/Server/Plugins/Probes.py | 18 |
1 files changed, 18 insertions, 0 deletions
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: |