aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--becommands/severity.py12
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
+