summaryrefslogtreecommitdiffstats
path: root/test/test_classifier.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-17 20:44:25 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-17 19:41:58 +0000
commit19cb04df063a85ab8e416a9f44fd47ff89857901 (patch)
tree5ea0a1eacec5d304a9245802ec4e0979a8242062 /test/test_classifier.py
parent2a7ea2ee92d6dc4800ee21323d3324a9e8449dcf (diff)
classify: make tests support python3
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I7c4a12165fa0928fb2b8d99fc1c8d5de16377e7e
Diffstat (limited to 'test/test_classifier.py')
-rw-r--r--test/test_classifier.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_classifier.py b/test/test_classifier.py
index 4892d26a515..0e6123ce93f 100644
--- a/test/test_classifier.py
+++ b/test/test_classifier.py
@@ -210,9 +210,9 @@ class TestClassifier(VppTestCase):
:param int dst_port: destination port number "x"
"""
if src_ip:
- src_ip = binascii.hexlify(socket.inet_aton(src_ip))
+ src_ip = binascii.hexlify(socket.inet_aton(src_ip)).decode('ascii')
if dst_ip:
- dst_ip = binascii.hexlify(socket.inet_aton(dst_ip))
+ dst_ip = binascii.hexlify(socket.inet_aton(dst_ip)).decode('ascii')
return ('{!s:0>20}{!s:0>12}{!s:0>8}{!s:0>4}{!s:0>4}'.format(
hex(proto)[2:], src_ip, dst_ip, hex(src_port)[2:],