diff options
author | Thomas Gerigk <tgerigk@gmx.de> | 2006-04-03 20:14:21 +0200 |
---|---|---|
committer | Thomas Gerigk <tgerigk@gmx.de> | 2006-04-03 20:14:21 +0200 |
commit | 54001214bc8fb46702060e62bde42ff15963b8f1 (patch) | |
tree | e62a0284f664e145ee747355823f25917004d5cb | |
parent | a5a63b3ae06f5cb0c24baa0d37af07ce7014f933 (diff) | |
download | bugseverywhere-54001214bc8fb46702060e62bde42ff15963b8f1.tar.gz |
changed severity.py-help to parsing.
-rw-r--r-- | becommands/severity.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/becommands/severity.py b/becommands/severity.py index 88d3f25..1a55d11 100644 --- a/becommands/severity.py +++ b/becommands/severity.py @@ -35,6 +35,7 @@ def execute(args): UserError: Invalid severity level: none >>> tests.clean_up() """ + options, args = get_parser().parse_args(args) assert(len(args) in (0, 1, 2)) if len(args) == 0: print help() @@ -51,10 +52,11 @@ def execute(args): raise cmdutil.UserError ("Invalid severity level: %s" % e.value) bug.save() +def get_parser(): + parser = cmdutil.CmdOptionParser("be severity bug-id [severity]") + return parser -def help(): - return """be severity bug-id [severity] - +longhelp=""" Show or change a bug's severity level. If no severity is specified, the current value is printed. If a severity level @@ -67,3 +69,7 @@ wishlist: A feature that could improve usefulness, but not a bug. critical: A bug that prevents some features from working at all. fatal: A bug that makes the package unusable. """ + +def help(): + return get_parser().help_str() + longhelp + |