aboutsummaryrefslogtreecommitdiffstats
path: root/Bugs-Everywhere-Web/beweb/controllers.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-19 07:57:57 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-19 07:57:57 -0500
commit35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d (patch)
tree66d70e054b4997ff1debb124e07b872df6f7afe3 /Bugs-Everywhere-Web/beweb/controllers.py
parent4c4f80d65e778544554ff0c9faebcf9ccff43614 (diff)
downloadbugseverywhere-35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d.tar.gz
Moved bug.new_bug code into bugdir.BugDir.new_bug.
Also removed explicit comparisons from beweb/controllers.py, since they are now built into the Bug.__cmp__ method.
Diffstat (limited to 'Bugs-Everywhere-Web/beweb/controllers.py')
-rw-r--r--Bugs-Everywhere-Web/beweb/controllers.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Bugs-Everywhere-Web/beweb/controllers.py b/Bugs-Everywhere-Web/beweb/controllers.py
index e3d555b..6773aec 100644
--- a/Bugs-Everywhere-Web/beweb/controllers.py
+++ b/Bugs-Everywhere-Web/beweb/controllers.py
@@ -4,9 +4,7 @@ import cherrypy
import turbogears
from turbogears import controllers, expose, validate, redirect, identity
-from libbe.bugdir import (tree_root, cmp_severity, new_bug, new_comment,
- NoRootEntry)
-from libbe import names
+from libbe.bugdir import tree_root, new_bug, new_comment, NoRootEntry
from config import projects
from prest import PrestHandler, provide_action
@@ -94,10 +92,7 @@ class Bug(PrestHandler):
bug_tree = project_tree(project)
bugs = list(bug_tree.list())
if sort_by is None:
- def cmp_date(bug1, bug2):
- return -cmp(bug1.time, bug2.time)
- bugs.sort(cmp_date)
- bugs.sort(cmp_severity)
+ bugs.sort()
return {"project_id" : project,
"project_name" : projects[project][0],
"bugs" : bugs,