From 54001214bc8fb46702060e62bde42ff15963b8f1 Mon Sep 17 00:00:00 2001 From: Thomas Gerigk Date: Mon, 3 Apr 2006 20:14:21 +0200 Subject: changed severity.py-help to parsing. --- becommands/severity.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'becommands') 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 + -- cgit