From 9f7e39ee5141791f93dbc1c842b1d1a49e33b068 Mon Sep 17 00:00:00 2001 From: Swapnil Negi <swapnil.negi09@gmail.com> Date: Sat, 19 May 2018 23:56:09 +0530 Subject: modtool: modify str.translate() for python3 compatibility --- gr-utils/python/modtool/util_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-utils/python') diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py index 6197da638a..bdf1d84164 100644 --- a/gr-utils/python/modtool/util_functions.py +++ b/gr-utils/python/modtool/util_functions.py @@ -19,6 +19,7 @@ # Boston, MA 02110-1301, USA. # """ Utility functions for gr_modtool """ + from __future__ import unicode_literals import re @@ -73,7 +74,7 @@ def strip_arg_types(string): string = strip_default_values(string) return ", ".join( [part.strip().split(' ')[-1] for part in string.split(',')] - ).translate(None, '*&') + ).translate(str.maketrans('','','*&')) def strip_arg_types_grc(string): """" Strip the argument types from a list of arguments for GRC make tag. -- cgit v1.2.3