From 35fbe1c884f7e91a27506ec782c6d379b804f4f9 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 17 Apr 2015 16:13:09 -0500 Subject: [PATCH] Correct typo for matching non-dict ovsdb rows As can be seen just above, the correct operator for the equality test is '=' and not '=='. This match isn't currently being used in the neutron code, but will be used by the OVN driver. The previous code would also raise NotImplemented when there was no match. Change-Id: I17ac85d1ad68d3e207225db300f65c0df1f6e1ad --- neutron/agent/ovsdb/native/idlutils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/neutron/agent/ovsdb/native/idlutils.py b/neutron/agent/ovsdb/native/idlutils.py index ba0508eaf..22aa0008a 100644 --- a/neutron/agent/ovsdb/native/idlutils.py +++ b/neutron/agent/ovsdb/native/idlutils.py @@ -169,10 +169,12 @@ def condition_match(row, condition): elif isinstance(match, list): raise NotImplementedError() else: - if op == '==' and val != match: - matched = False - elif op == '!=' and val == match: - matched = False + if op == '=': + if val != match: + matched = False + elif op == '!=': + if val == match: + matched = False else: raise NotImplementedError() return matched -- 2.45.2