summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcatherine devlin <catherine.devlin@gmail.com>2011-02-02 08:00:26 -0500
committercatherine devlin <catherine.devlin@gmail.com>2011-02-02 08:00:26 -0500
commit5655bd33f1796046c00823409c6d386b195717b1 (patch)
treed585e6553208a627bbdcd1b8c7d55c65d270a972
parentfe85f182b25d0e8a584abaea21249ee4ac32fc47 (diff)
downloadcmd2-hg-5655bd33f1796046c00823409c6d386b195717b1.tar.gz
use exception inheritence instead of listing all optparse exceptions
-rwxr-xr-xcmd2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd2.py b/cmd2.py
index 5201873..d859c37 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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