[ovs-dev] [PATCH] python: allow UnixctlClient to get argv as tuple in transact

Moshe Levi moshele at mellanox.com
Mon Mar 16 03:29:47 UTC 2020

Currently transact check that argv is of type list. This patch
allow argv also to be tuple.

Signed-off-by: Moshe Levi <moshele at mellanox.com>
 python/ovs/unixctl/client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/ovs/unixctl/client.py b/python/ovs/unixctl/client.py
index 8283f99bb..50f619f4b 100644
--- a/python/ovs/unixctl/client.py
+++ b/python/ovs/unixctl/client.py
@@ -28,7 +28,7 @@ class UnixctlClient(object):
     def transact(self, command, argv):
         assert isinstance(command, str)
-        assert isinstance(argv, list)
+        assert isinstance(argv, (list, tuple))
         for arg in argv:
             assert isinstance(arg, str)

More information about the dev mailing list