From 19cb04df063a85ab8e416a9f44fd47ff89857901 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 17 Oct 2019 20:44:25 +0200 Subject: classify: make tests support python3 Type: fix Signed-off-by: Ole Troan Change-Id: I7c4a12165fa0928fb2b8d99fc1c8d5de16377e7e --- test/vpp_papi_provider.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/vpp_papi_provider.py') diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 297c1592dbf..8da0811d770 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -744,9 +744,8 @@ class VppPapiProvider(object): :param current_data_flag: (Default value = 0) :param current_data_offset: (Default value = 0) """ - - mask_len = ((len(mask) - 1) / 16 + 1) * 16 - mask = mask + '\0' * (mask_len - len(mask)) + mask_len = ((len(mask) - 1) // 16 + 1) * 16 + mask = mask + b'\0' * (mask_len - len(mask)) return self.api( self.papi.classify_add_del_table, {'is_add': is_add, @@ -783,8 +782,8 @@ class VppPapiProvider(object): :param metadata: (Default value = 0) """ - match_len = ((len(match) - 1) / 16 + 1) * 16 - match = match + '\0' * (match_len - len(match)) + match_len = ((len(match) - 1) // 16 + 1) * 16 + match = match + b'\0' * (match_len - len(match)) return self.api( self.papi.classify_add_del_session, {'is_add': is_add, -- cgit 1.2.3-korg