diff options
| author | Catherine Devlin <catherine.devlin@gmail.com> | 2011-02-02 08:00:26 -0500 |
|---|---|---|
| committer | Catherine Devlin <catherine.devlin@gmail.com> | 2011-02-02 08:00:26 -0500 |
| commit | 3534ea12158115682623da37037cc110d67799ac (patch) | |
| tree | d585e6553208a627bbdcd1b8c7d55c65d270a972 /cmd2.py | |
| parent | 5b3a83ae2b4f2cd49d8635c18de6d7f28040ffeb (diff) | |
| download | cmd2-git-3534ea12158115682623da37037cc110d67799ac.tar.gz | |
use exception inheritence instead of listing all optparse exceptions
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -135,9 +135,7 @@ def options(option_list, arg_desc="arg"): arg = arg.with_args_replaced(newArgs) else: arg = newArgs - except (optparse.OptionValueError, optparse.BadOptionError, - optparse.OptionError, optparse.AmbiguousOptionError, - optparse.OptionConflictError), e: + except optparse.OptParseError, e: print (e) optionParser.print_help() return |
