diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-11 17:45:05 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-11 17:45:05 +0000 |
commit | f5458611072ab7c6048311430771d1ec297d4f61 (patch) | |
tree | 0f3c8787b0063a6d78a347e6b3f5276f3a5f4513 /commands/severity.py | |
parent | 56c2c54ef00acc75f2bce8ded2b7fa66e8d07712 (diff) | |
download | bugseverywhere-f5458611072ab7c6048311430771d1ec297d4f61.tar.gz |
Added severity command
Diffstat (limited to 'commands/severity.py')
-rw-r--r-- | commands/severity.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/commands/severity.py b/commands/severity.py new file mode 100644 index 0000000..7a5051a --- /dev/null +++ b/commands/severity.py @@ -0,0 +1,38 @@ +"""Show or change a bug's severity level""" +from libbe.bugdir import tree_root +from libbe.cmdutil import get_bug +from libbe import bugdir +from libbe import cmdutil +__desc__ = __doc__ +def execute(args): + assert(len(args) in (0, 1, 2)) + if len(args) == 0: + print help() + return + bug = get_bug(args[0]) + if len(args) == 1: + print bug.severity + elif len(args) == 2: + try: + bug.severity = args[1] + except bugdir.InvalidValue, e: + if e.name != "severity": + raise + raise cmdutil.UserError ("Invalid severity level: %s" % e.value) + + +def help(): + return """be severity bug-id [severity] + +Show or change a bug's severity level. + +If no severity is specified, the current value is printed. If a severity level +is specified, it will be assigned to the bug. + +Severity levels are: +wishlist: A feature that could improve usefulness, but not a bug. + minor: The standard bug level. + serious: A bug that requires workarounds. +critical: A bug that prevents some features from working at all. + fatal: A bug that makes the package unusable. +""" |