Skip to content

Commit f331c54

Browse files
committed
poller/service: fixed the definition for version discovery
we swap the order of operators in the operators dict because otherwise operators like ge(>=) and le(<=) don't work correctly. without this change for example gt(>) would be selected instead of ge(>=) Signed-off-by: AndryNick98 <[email protected]>
1 parent 1c0598d commit f331c54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

suzieq/poller/worker/services/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ def _get_def_for_version(self, defn: List, version: str) -> Dict:
321321
# There are various outputs that due to an old parsing bug
322322
# return a node version of 0. Use 'all' for those
323323
continue
324-
opdict = {'>': operator.gt, '<': operator.lt,
325-
'>=': operator.ge, '<=': operator.le,
324+
opdict = {'>=': operator.ge, '<=': operator.le,
325+
'>': operator.gt, '<': operator.lt,
326326
'=': operator.eq, '!=': operator.ne}
327327
op = operator.eq
328328

0 commit comments

Comments
 (0)