summaryrefslogtreecommitdiff
path: root/python/ovstest/udp.py
diff options
context:
space:
mode:
authorRussell Bryant <russell@ovn.org>2015-12-14 14:22:21 -0500
committerRussell Bryant <russell@ovn.org>2016-01-12 11:47:33 -0500
commit66d61c90a79db159cc43e3f17c57d83d9a99453f (patch)
tree4562d89d6588e18e8d8ec345457564d623809feb /python/ovstest/udp.py
parent3ab76c56d88bcdb5d3993ed8c793312a754b7315 (diff)
downloadopenvswitch-66d61c90a79db159cc43e3f17c57d83d9a99453f.tar.gz
python: Stop use of tuple parameter unpacking
Python 3 removed support for tuple parameter unpacking. https://www.python.org/dev/peps/pep-3113/ Instead of: def foo((a, b)): print(a) print(b) you should do: def foo(a_b): a, b = a_b print(a) print(b) but in both uses here, the values were never used so the fix is even simpler. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'python/ovstest/udp.py')
-rw-r--r--python/ovstest/udp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/ovstest/udp.py b/python/ovstest/udp.py
index d6e6162fe..acd28d575 100644
--- a/python/ovstest/udp.py
+++ b/python/ovstest/udp.py
@@ -31,7 +31,7 @@ class UdpListener(DatagramProtocol):
def __init__(self):
self.stats = []
- def datagramReceived(self, data, (_1, _2)):
+ def datagramReceived(self, data, _1_2):
"""This function is called each time datagram is received"""
try:
self.stats.append(struct.unpack_from("Q", data, 0))
@@ -67,7 +67,7 @@ class UdpSender(DatagramProtocol):
self.looper.stop()
self.looper = None
- def datagramReceived(self, data, (host, port)):
+ def datagramReceived(self, data, host_port):
pass
def sendData(self):