summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/util_functions.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2013-09-07 22:13:43 -0300
committerJohnathan Corgan <johnathan@corganlabs.com>2013-09-07 22:13:43 -0300
commitd09f1c3de676c0a6542fd758c73623b24d9e05ad (patch)
treedb94a35672c7029c047c6e599d0fb4a80c90f274 /gr-utils/python/modtool/util_functions.py
parent3d66e5808e5a5847a0aeb39515d5436f3c8acbe6 (diff)
modtool: fix GRC XML file creation when no args
Fixes bug where no args produces ($) in make clause
Diffstat (limited to 'gr-utils/python/modtool/util_functions.py')
-rw-r--r--gr-utils/python/modtool/util_functions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py
index 9551056f0d..9e8cf9a854 100644
--- a/gr-utils/python/modtool/util_functions.py
+++ b/gr-utils/python/modtool/util_functions.py
@@ -84,8 +84,10 @@ def strip_arg_types(string):
def strip_arg_types_grc(string):
"""" Strip the argument types from a list of arguments for GRC make tag.
Example: "int arg1, double arg2" -> "$arg1, $arg2" """
- string = strip_default_values(string)
- return ", ".join(['$' + part.strip().split(' ')[-1] for part in string.split(',')])
+ if len(string) == 0:
+ return ""
+ else:
+ return ", ".join(['$' + part.strip().split(' ')[-1] for part in string.split(',')])
def get_modname():
""" Grep the current module's name from gnuradio.project or CMakeLists.txt """