From 6ed154f779c765f38b61ed84349bd539287dd02b Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Tue, 15 Oct 2019 19:31:55 +0200 Subject: tests: cli wrapper should return string Python3 fixes. Type: fix Signed-off-by: Ole Troan Change-Id: I648b2142d45dfab9146a02eeb1b12de11103ff9f Signed-off-by: Ole Troan --- test/vpp_interface.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/vpp_interface.py') diff --git a/test/vpp_interface.py b/test/vpp_interface.py index 1e047f5f700..431a03a6858 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -33,7 +33,7 @@ class VppInterface(object): @property def local_mac(self): """MAC-address of the VPP interface.""" - return self._local_mac + return str(self._local_mac) @property def local_addr(self): @@ -260,9 +260,8 @@ class VppInterface(object): r = self.test.vapi.sw_interface_dump(sw_if_index=self.sw_if_index) for intf in r: if intf.sw_if_index == self.sw_if_index: - self._name = intf.interface_name.split(b'\0', - 1)[0].decode('utf8') - self._local_mac = bytes(intf.l2_address) + self._name = intf.interface_name + self._local_mac = intf.l2_address self._dump = intf break else: -- cgit 1.2.3-korg