summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-08-01 15:45:10 +0200
committermathieui <mathieui@mathieui.net>2012-08-01 15:45:10 +0200
commitf76e80c5fae108d29ba87a495cd92a1f185c1da2 (patch)
tree85459d871c6a69a3a99a0a6d4f7b29c9dcc190c6 /src/contact.py
parent9905646184361dba98ad742b39e946bb74580c7a (diff)
downloadpoezio-f76e80c5fae108d29ba87a495cd92a1f185c1da2.tar.gz
poezio-f76e80c5fae108d29ba87a495cd92a1f185c1da2.tar.bz2
poezio-f76e80c5fae108d29ba87a495cd92a1f185c1da2.tar.xz
poezio-f76e80c5fae108d29ba87a495cd92a1f185c1da2.zip
Sort resources from highest priority to lowest
- Previously it was from lowest to highest - Add the “Priority:” info to the “i” key in the roster
Diffstat (limited to 'src/contact.py')
-rw-r--r--src/contact.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/contact.py b/src/contact.py
index 3de2f496..3a8e38ab 100644
--- a/src/contact.py
+++ b/src/contact.py
@@ -148,7 +148,7 @@ class Contact(object):
def get_resources(self):
"""Return all resources, sorted by priority """
compare_resources = lambda x: x.priority
- return sorted(self.resources, key=compare_resources)
+ return sorted(self.resources, key=compare_resources, reverse=True)
def get_highest_priority_resource(self):
"""Return the resource with the highest priority"""