summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/modtool_add.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-09-22 16:27:15 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-09-22 16:27:15 -0700
commit1ca375a1abdba35e34c42603e25d5d0118a639d2 (patch)
tree17df66d901178473b2ce7cfec4f75fef26d79b55 /gr-utils/python/modtool/modtool_add.py
parentb8f97b1694c1244103b9f02a27cc47c260422c7a (diff)
parent5ee319cb49a5a344521f33b123b4ad0d0927163a (diff)
Merge remote-tracking branch 'github/pr/1435' into python3
Diffstat (limited to 'gr-utils/python/modtool/modtool_add.py')
-rw-r--r--gr-utils/python/modtool/modtool_add.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py
index 74f11318d0..8c5eed29ec 100644
--- a/gr-utils/python/modtool/modtool_add.py
+++ b/gr-utils/python/modtool/modtool_add.py
@@ -76,14 +76,14 @@ class ModToolAdd(ModTool):
# Print(list out of blocktypes to user for reference)
print(str(self._block_types))
while self._info['blocktype'] not in self._block_types:
- self._info['blocktype'] = eval(input("Enter block type: "))
+ self._info['blocktype'] = input("Enter block type: ")
if self._info['blocktype'] not in self._block_types:
print('Must be one of ' + str(self._block_types))
# Allow user to specify language interactively if not set
self._info['lang'] = options.lang
if self._info['lang'] is None:
while self._info['lang'] not in ['c++', 'cpp', 'python']:
- self._info['lang'] = eval(input("Language (python/cpp): "))
+ self._info['lang'] = input("Language (python/cpp): ")
if self._info['lang'] == 'c++':
self._info['lang'] = 'cpp'
@@ -94,7 +94,7 @@ class ModToolAdd(ModTool):
raise ModToolException('Missing or skipping relevant subdir.')
if self._info['blockname'] is None:
- self._info['blockname'] = eval(input("Enter name of block/code (without module name prefix): "))
+ self._info['blockname'] = input("Enter name of block/code (without module name prefix): ")
if not re.match('[a-zA-Z0-9_]+', self._info['blockname']):
raise ModToolException('Invalid block name.')
print("Block/code identifier: " + self._info['blockname'])
@@ -110,7 +110,7 @@ class ModToolAdd(ModTool):
if options.argument_list is not None:
self._info['arglist'] = options.argument_list
else:
- self._info['arglist'] = eval(input('Enter valid argument list, including default arguments: '))
+ self._info['arglist'] = input('Enter valid argument list, including default arguments: ')
if not (self._info['blocktype'] in ('noblock') or self._skip_subdirs['python']):
self._add_py_qa = options.add_python_qa