From 35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Nov 2008 07:57:57 -0500 Subject: 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. --- Bugs-Everywhere-Web/beweb/controllers.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Bugs-Everywhere-Web/beweb/controllers.py') 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, -- cgit