summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcatherine devlin <catherine.devlin@gmail.com>2011-02-02 05:26:37 -0800
committercatherine devlin <catherine.devlin@gmail.com>2011-02-02 05:26:37 -0800
commit3db47c201dd6b24258a8808842468c120a4629d8 (patch)
tree91fdff5ab47e090c18b4ed27ff6be203df5b264b
parentfd14065877e9170155d9f426a0fecc9c38f02e4a (diff)
downloadcmd2-hg-3db47c201dd6b24258a8808842468c120a4629d8.tar.gz
raise a specific error overriding optparse .error
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 5dee1fd..bf98652 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -69,7 +69,7 @@ class OptionParser(optparse.OptionParser):
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
"""
- raise
+ raise optparse.OptParseError(msg)
def remaining_args(oldArgs, newArgList):
'''