From 5e141174f166e5abacfbda9d446e5a50236ba4a9 Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Wed, 13 Feb 2019 10:10:32 +0800 Subject: [PATCH] modify RowEvent hash key conditions can not be as the hash key, some columns type are list or dict which can't be hash Change-Id: Ib9cdf6ab6cabd60b3d42bd4acde6daae0831b96c --- ovsdbapp/event.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ovsdbapp/event.py b/ovsdbapp/event.py index 7ececf5c..72dcac9b 100644 --- a/ovsdbapp/event.py +++ b/ovsdbapp/event.py @@ -38,14 +38,15 @@ class RowEvent(object): @property def key(self): - return (self.__class__, self.table, self.events, self.conditions) + return (self.__class__, self.table, tuple(self.events)) def __hash__(self): return hash(self.key) def __eq__(self, other): try: - return self.key == other.key + return (self.key == other.key and + self.conditions == other.conditions) except AttributeError: return False