summaryrefslogtreecommitdiffstats
path: root/cobbler/collection.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-11 12:49:03 -0400
committerJim Meyering <jim@meyering.net>2006-10-11 12:49:03 -0400
commit4428ce9a12d83aba5e3a977a860945dc3d4d7f92 (patch)
treeec6d749a8cd2cacab7a35ce98ebe8d25f82bf7ca /cobbler/collection.py
parent3bbe407dd8024263662cf80a308f221c516b8f7b (diff)
downloadthird_party-cobbler-4428ce9a12d83aba5e3a977a860945dc3d4d7f92.tar.gz
third_party-cobbler-4428ce9a12d83aba5e3a977a860945dc3d4d7f92.tar.xz
third_party-cobbler-4428ce9a12d83aba5e3a977a860945dc3d4d7f92.zip
Sort in a Python 2.3 compatible way.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r--cobbler/collection.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py
index de795b4..cd3a0c0 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -89,7 +89,8 @@ class Collection(serializable.Serializable):
for reading by humans or parsing from scripts. Actually scripts
would be better off reading the YAML in the config files directly.
"""
- values = sorted(self.listing.values())
+ values = self.listing.values()[:] # copy the values
+ values.sort() # sort the copy (2.3 fix)
results = []
for i,v in enumerate(values):
results.append(v.printable(1+i))