aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/severity.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-03-11 18:39:26 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-03-11 18:39:26 +0000
commit20a48a1ad3f720d915084d6d139b3790cd4630eb (patch)
tree4b89c9694971033355bb018af36ddbb578024f65 /becommands/severity.py
parent51c729fdfd03369e2ad7dc6752034469cfbdf253 (diff)
downloadbugseverywhere-20a48a1ad3f720d915084d6d139b3790cd4630eb.tar.gz
Modularized commands into files
Diffstat (limited to 'becommands/severity.py')
-rw-r--r--becommands/severity.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/becommands/severity.py b/becommands/severity.py
new file mode 100644
index 0000000..a421dd2
--- /dev/null
+++ b/becommands/severity.py
@@ -0,0 +1,37 @@
+"""Show or change a bug's severity level"""
+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 = cmdutil.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.
+"""