diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2013-11-24 20:23:39 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@kit.edu> | 2013-11-27 22:33:04 +0100 |
commit | fa5480e8bccec39278e9c5f81c09d1e702fd0fd7 (patch) | |
tree | 15d398b9828da5586944157857189de78f2a126f /gr-utils/python/modtool/util_functions.py | |
parent | 77b36be049ed864beaf450413e4b960d909d6f8a (diff) |
modtool: no more exit() in modtool package
Conflicts:
gr-utils/python/modtool/modtool_newmod.py
Diffstat (limited to 'gr-utils/python/modtool/util_functions.py')
-rw-r--r-- | gr-utils/python/modtool/util_functions.py | 9 |
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 |