changeset 417:db32ab37051b

use exception inheritence instead of listing all optparse exceptions
author catherine.devlin@gmail.com
date Wed, 02 Feb 2011 08:00:26 -0500
parents a9f936346399
children b5f904daae83
files cmd2.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Tue Feb 01 18:27:48 2011 -0500
+++ b/cmd2.py	Wed Feb 02 08:00:26 2011 -0500
@@ -135,9 +135,7 @@
                     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