aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_neighbor.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-25 16:09:26 -0800
committerOle Trøan <otroan@employees.org>2019-02-26 09:38:12 +0000
commit1e18eb20c34d2b5e3b815c34831a78a14af98259 (patch)
tree3e7bab8c6c9376b3f9ef1a225f1ad1f5594e170b /test/vpp_neighbor.py
parent9338fc644da4e1d9d9ac9f1e3886f555918026f8 (diff)
VPP-1508 python tests: unicode
Change unicode references to use text_type Change-Id: Ia71c16e3235bc509abd3b1c651ae125f892ab108 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_neighbor.py')
-rw-r--r--test/vpp_neighbor.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/vpp_neighbor.py b/test/vpp_neighbor.py
index 7391447ff9b..b38aae89e74 100644
--- a/test/vpp_neighbor.py
+++ b/test/vpp_neighbor.py
@@ -7,10 +7,14 @@
from ipaddress import ip_address
from vpp_object import *
from vpp_papi import mac_pton, VppEnum
+try:
+ text_type = unicode
+except NameError:
+ text_type = str
def find_nbr(test, sw_if_index, nbr_addr, is_static=0, mac=None):
- ip_addr = ip_address(unicode(nbr_addr))
+ ip_addr = ip_address(text_type(nbr_addr))
e = VppEnum.vl_api_ip_neighbor_flags_t
nbrs = test.vapi.ip_neighbor_dump(sw_if_index,
is_ipv6=(6 is ip_addr.version))