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 | 5655bd33f1796046c00823409c6d386b195717b1 (patch) | |
tree | d585e6553208a627bbdcd1b8c7d55c65d270a972 | |
parent | fe85f182b25d0e8a584abaea21249ee4ac32fc47 (diff) | |
download | cmd2-hg-5655bd33f1796046c00823409c6d386b195717b1.tar.gz |
use exception inheritence instead of listing all optparse exceptions
-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 |