tests/sendpkt.py: Fix to work with Python3
CC: Ashish Varma
Fixes: ("tests: Added NSH related unit test cases for datapath")
Acked-by: Ashish Varma
@@ -66,7 +66,10 @@ for a in args[1:]:
hex_list.append(temp)
+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)
