summaryrefslogtreecommitdiff
path: root/gr-utils/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/python')
-rw-r--r--gr-utils/python/modtool/modtool_add.py8
-rw-r--r--gr-utils/python/modtool/modtool_disable.py2
-rw-r--r--gr-utils/python/modtool/modtool_makexml.py2
-rw-r--r--gr-utils/python/modtool/modtool_newmod.py2
-rw-r--r--gr-utils/python/modtool/modtool_rename.py4
-rw-r--r--gr-utils/python/modtool/modtool_rm.py2
6 files changed, 10 insertions, 10 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
diff --git a/gr-utils/python/modtool/modtool_disable.py b/gr-utils/python/modtool/modtool_disable.py
index 629a810cb0..619858978d 100644
--- a/gr-utils/python/modtool/modtool_disable.py
+++ b/gr-utils/python/modtool/modtool_disable.py
@@ -50,7 +50,7 @@ class ModToolDisable(ModTool):
if options.blockname is not None:
self._info['pattern'] = options.blockname
else:
- self._info['pattern'] = eval(input('Which blocks do you want to disable? (Regex): '))
+ self._info['pattern'] = input('Which blocks do you want to disable? (Regex): ')
if len(self._info['pattern']) == 0:
self._info['pattern'] = '.'
diff --git a/gr-utils/python/modtool/modtool_makexml.py b/gr-utils/python/modtool/modtool_makexml.py
index dffd403a37..74fed4b7a1 100644
--- a/gr-utils/python/modtool/modtool_makexml.py
+++ b/gr-utils/python/modtool/modtool_makexml.py
@@ -58,7 +58,7 @@ class ModToolMakeXML(ModTool):
if options.blockname is not None:
self._info['pattern'] = options.blockname
else:
- self._info['pattern'] = eval(input('Which blocks do you want to parse? (Regex): '))
+ self._info['pattern'] = input('Which blocks do you want to parse? (Regex): ')
if len(self._info['pattern']) == 0:
self._info['pattern'] = '.'
diff --git a/gr-utils/python/modtool/modtool_newmod.py b/gr-utils/python/modtool/modtool_newmod.py
index b3e384d122..c283204ee2 100644
--- a/gr-utils/python/modtool/modtool_newmod.py
+++ b/gr-utils/python/modtool/modtool_newmod.py
@@ -53,7 +53,7 @@ class ModToolNewModule(ModTool):
if options.module_name:
self._info['modname'] = options.module_name
else:
- self._info['modname'] = eval(input('Name of the new module: '))
+ self._info['modname'] = input('Name of the new module: ')
if not re.match('[a-zA-Z0-9_]+$', self._info['modname']):
raise ModToolException('Invalid module name.')
self._dir = options.directory
diff --git a/gr-utils/python/modtool/modtool_rename.py b/gr-utils/python/modtool/modtool_rename.py
index 4973aa9e78..c2229f28fb 100644
--- a/gr-utils/python/modtool/modtool_rename.py
+++ b/gr-utils/python/modtool/modtool_rename.py
@@ -62,7 +62,7 @@ class ModToolRename(ModTool):
# first make sure the old block name is provided
self._info['oldname'] = options.blockname
if self._info['oldname'] is None:
- self._info['oldname'] = eval(input("Enter name of block/code to rename (without module name prefix): "))
+ self._info['oldname'] = input("Enter name of block/code to rename (without module name prefix): ")
if not re.match('[a-zA-Z0-9_]+', self._info['oldname']):
raise ModToolException('Invalid block name.')
print("Block/code to rename identifier: " + self._info['oldname'])
@@ -70,7 +70,7 @@ class ModToolRename(ModTool):
# now get the new block name
if options.new_name is None:
- self._info['newname'] = eval(input("Enter name of block/code (without module name prefix): "))
+ self._info['newname'] = input("Enter name of block/code (without module name prefix): ")
else:
self._info['newname'] = options.new_name[0]
if not re.match('[a-zA-Z0-9_]+', self._info['newname']):
diff --git a/gr-utils/python/modtool/modtool_rm.py b/gr-utils/python/modtool/modtool_rm.py
index 248d1b7ca8..dffd5c2e45 100644
--- a/gr-utils/python/modtool/modtool_rm.py
+++ b/gr-utils/python/modtool/modtool_rm.py
@@ -52,7 +52,7 @@ class ModToolRemove(ModTool):
if options.blockname is not None:
self._info['pattern'] = options.blockname
else:
- self._info['pattern'] = eval(input('Which blocks do you want to delete? (Regex): '))
+ self._info['pattern'] = input('Which blocks do you want to delete? (Regex): ')
if len(self._info['pattern']) == 0:
self._info['pattern'] = '.'