Skip to content

Commit 35021a7

Browse files
committed
Device: incorrectly expecting != instead of ! in version string, fix
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent 247563a commit 35021a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

suzieq/engines/pandas/device.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ def get(self, **kwargs):
117117
df = df.loc[df.status.isin(status)]
118118
if os_version:
119119
opdict = {'>': operator.gt, '<': operator.lt, '>=': operator.ge,
120-
'<=': operator.le, '=': operator.eq, '!=': operator.ne}
120+
'<=': operator.le, '=': operator.eq, '!': operator.ne}
121121
op = operator.eq
122122
for osv in os_version:
123+
# Introduced in 0.19.1, we do this for backwards compatibility
124+
osv = osv.replace('!=', '!')
123125
for elem, val in opdict.items():
124126
if osv.startswith(elem):
125127
osv = osv.replace(elem, '')

0 commit comments

Comments
 (0)