summaryrefslogtreecommitdiffstats
path: root/test/vpp_interface.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-25 10:35:29 -0800
committerOle Trøan <otroan@employees.org>2018-11-27 09:01:27 +0000
commit6e4c6ad92e59045f0babf5af5093cb8402ec37fb (patch)
tree59edf45a2f162be15a7603540b399cefa8990670 /test/vpp_interface.py
parent6c746172ef2a8ab7b6a267a889fedd1336f00371 (diff)
VPP-1508 python3 tests: .encode('hex')
Change to binascii.hexlify() for consistent bahavior. Change-Id: Ie430cdd1ffeb6510db4aa037546e42d85992093b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r--test/vpp_interface.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py
index 8639f8745c5..a464bf38984 100644
--- a/test/vpp_interface.py
+++ b/test/vpp_interface.py
@@ -1,3 +1,4 @@
+import binascii
import socket
from abc import abstractmethod, ABCMeta
@@ -232,7 +233,7 @@ class VppInterface(object):
if intf.sw_if_index == self.sw_if_index:
self._name = intf.interface_name.split(b'\0', 1)[0]
self._local_mac = \
- ':'.join(intf.l2_address.encode('hex')[i:i + 2]
+ ':'.join(binascii.hexlify(intf.l2_address)[i:i + 2]
for i in range(0, 12, 2))
self._dump = intf
break