In method from_python, when parameter 'value' is in list type or tuple
type, it will process per each element in 'value'. And indeed, it just
needs a iterable sequence here, no matter it's a list or tuple.
So set type should be considered too, it's also a basic, common iterable
sequence type from python.

Signed-off-by: Zong Kai LI <zealo...@gmail.com>
---
 python/ovs/db/data.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/ovs/db/data.py b/python/ovs/db/data.py
index 747acd5..6d87f89 100644
--- a/python/ovs/db/data.py
+++ b/python/ovs/db/data.py
@@ -521,7 +521,7 @@ class Datum(object):
                 ka = Atom.from_python(type_.key, row_to_uuid(k))
                 va = Atom.from_python(type_.value, row_to_uuid(v))
                 d[ka] = va
-        elif isinstance(value, (list, tuple)):
+        elif isinstance(value, (list, set, tuple)):
             for k in value:
                 ka = Atom.from_python(type_.key, row_to_uuid(k))
                 d[ka] = None
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to