summaryrefslogtreecommitdiff
path: root/cmd2.py
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
commit3534ea12158115682623da37037cc110d67799ac (patch)
treed585e6553208a627bbdcd1b8c7d55c65d270a972 /cmd2.py
parent5b3a83ae2b4f2cd49d8635c18de6d7f28040ffeb (diff)
downloadcmd2-git-3534ea12158115682623da37037cc110d67799ac.tar.gz
use exception inheritence instead of listing all optparse exceptions
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd2.py b/cmd2.py
index 5201873f..d859c37a 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