summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Hagedorn <hagedorn@mcs.anl.gov>2006-08-01 20:08:13 +0000
committerJoey Hagedorn <hagedorn@mcs.anl.gov>2006-08-01 20:08:13 +0000
commitdeaca7b927cdb99bb2760a6fc2600c6837520fe2 (patch)
treea45f08afa38ef1e4cd05c287013275ba11e111f5
parent74aed9bd721655e8ddad42e4acac31d770354030 (diff)
downloadbcfg2-deaca7b927cdb99bb2760a6fc2600c6837520fe2.tar.gz
bcfg2-deaca7b927cdb99bb2760a6fc2600c6837520fe2.tar.bz2
bcfg2-deaca7b927cdb99bb2760a6fc2600c6837520fe2.zip
fix for python 2.3
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2022 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--reports/brpt/reports/templatetags/django_templating_sigh.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/reports/brpt/reports/templatetags/django_templating_sigh.py b/reports/brpt/reports/templatetags/django_templating_sigh.py
index 59fcce204..555ef4e6c 100644
--- a/reports/brpt/reports/templatetags/django_templating_sigh.py
+++ b/reports/brpt/reports/templatetags/django_templating_sigh.py
@@ -15,10 +15,14 @@ def set_interaction(parser, token):
def sortwell(value):
"sorts a list(or evaluates queryset to list) of bad, extra, or modified items in the best way for presentation"
- return sorted(sorted(list(value),lambda x,y: cmp(x.name, y.name)), lambda x,y: cmp(x.kind, y.kind))
+ configItems = list(value)
+ sort(sort(configItems,lambda x,y: cmp(x.name, y.name)), lambda x,y: cmp(x.kind, y.kind))
+ return configItems
def sortname(value):
"sorts a list( or evaluates queryset) by name"
- return sorted(list(value),lambda x,y: cmp(x.name, y.name))
+ configItems = list(value)
+ sort(configItems,lambda x,y: cmp(x.name, y.name))
+ return configItems
class SetInteraction(template.Node):
def __init__(self, times):