mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 15:55:19 +00:00
tests/sendpkt.py: Fix to work with Python3
CC: Ashish Varma <ashishvarma.ovs@gmail.com>
Fixes: 296251ca0c
("tests: Added NSH related unit test cases for datapath")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Ashish Varma <ashishvarma.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
f7979b1181
commit
7c8d6fee1f
@@ -66,7 +66,10 @@ for a in args[1:]:
|
||||
|
||||
hex_list.append(temp)
|
||||
|
||||
pkt = "".join(map(chr, hex_list))
|
||||
if sys.version_info < (3, 0):
|
||||
pkt = "".join(map(chr, hex_list))
|
||||
else:
|
||||
pkt = bytes(hex_list)
|
||||
|
||||
try:
|
||||
sockfd = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
|
||||
|
Reference in New Issue
Block a user