summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/util_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/python/modtool/util_functions.py')
-rw-r--r--gr-utils/python/modtool/util_functions.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py
index 71a7a7f535..ea7af0cf7c 100644
--- a/gr-utils/python/modtool/util_functions.py
+++ b/gr-utils/python/modtool/util_functions.py
@@ -29,13 +29,8 @@ def get_command_from_argv(possible_cmds):
""" Read the requested command from argv. This can't be done with optparse,
since the option parser isn't defined before the command is known, and
optparse throws an error."""
- command = None
for arg in sys.argv:
- if arg[0] == "-":
- continue
- else:
- command = arg
- if command in possible_cmds:
+ if arg[0] != "-" and arg in possible_cmds:
return arg
return None
@@ -111,7 +106,7 @@ def get_modname():
return None
def is_number(s):
- " Return True if the string s contains a number. "
+ """ Return True if the string s contains a number. """
try:
float(s)
return True