diff options
author | Swapnil Negi <swapnil.negi09@gmail.com> | 2018-05-19 23:56:09 +0530 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-05-26 10:23:33 +0200 |
commit | 9f7e39ee5141791f93dbc1c842b1d1a49e33b068 (patch) | |
tree | 3bf0f7e0a48ecfb8c690aef68dd73b24c9d39403 | |
parent | 257857a4924d72dde2e9588af562e54ff83cf2b1 (diff) |
modtool: modify str.translate() for python3 compatibility
-rw-r--r-- | gr-utils/python/modtool/util_functions.py | 3 |
1 files changed, 2 insertions, 1 deletions
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. |