aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/list.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/list.py
parent51c729fdfd03369e2ad7dc6752034469cfbdf253 (diff)
downloadbugseverywhere-20a48a1ad3f720d915084d6d139b3790cd4630eb.tar.gz
Modularized commands into files
Diffstat (limited to 'becommands/list.py')
-rw-r--r--becommands/list.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/becommands/list.py b/becommands/list.py
new file mode 100644
index 0000000..b608629
--- /dev/null
+++ b/becommands/list.py
@@ -0,0 +1,18 @@
+from libbe import bugdir, cmdutil
+import os
+def execute(args):
+ active = True
+ severity = ("minor", "serious", "critical", "fatal")
+ def filter(bug):
+ if active is not None:
+ if bug.active != active:
+ return False
+ if bug.severity not in severity:
+ return False
+ return True
+ all_bugs = list(bugdir.tree_root(os.getcwd()).list())
+ bugs = [b for b in all_bugs if filter(b) ]
+ if len(bugs) == 0:
+ print "No matching bugs found"
+ for bug in bugs:
+ print cmdutil.bug_summary(bug, all_bugs)