mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 18:07:40 +00:00
tests/sendpkt.py: Fix to work with Python3
CC: Ashish Varma <ashishvarma.ovs@gmail.com> Fixes: 296251ca0c82 ("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:
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user