From: Thomas Gerigk Date: Mon, 3 Apr 2006 18:14:21 +0000 (+0200) Subject: changed severity.py-help to parsing. X-Git-Tag: 1.0.0~199^2~5^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54001214bc8fb46702060e62bde42ff15963b8f1;p=be.git changed severity.py-help to parsing. --- 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 +