summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-07-31 20:51:18 +0200
committermathieui <mathieui@mathieui.net>2012-07-31 20:51:18 +0200
commit4a7f6c5eaf2d4fa721e3ce80860d65f48d38b375 (patch)
tree56f23efcc83f9129c5169a110a4864eec58723c9 /src/contact.py
parentee97ba6b6cf96d2f6f0dd67928da4f370bab9f12 (diff)
downloadpoezio-4a7f6c5eaf2d4fa721e3ce80860d65f48d38b375.tar.gz
poezio-4a7f6c5eaf2d4fa721e3ce80860d65f48d38b375.tar.bz2
poezio-4a7f6c5eaf2d4fa721e3ce80860d65f48d38b375.tar.xz
poezio-4a7f6c5eaf2d4fa721e3ce80860d65f48d38b375.zip
Sort the contacts in the roster groups by show (xa/away/…)
Diffstat (limited to 'src/contact.py')
-rw-r--r--src/contact.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/contact.py b/src/contact.py
index 8d3b2bdf..3de2f496 100644
--- a/src/contact.py
+++ b/src/contact.py
@@ -33,15 +33,15 @@ class Resource(object):
@property
def priority(self):
- return self._data['priority']
+ return self._data.get('priority') or 0
@property
def presence(self):
- return self._data['show']
+ return self._data.get('show') or ''
@property
def status(self):
- return self._data['status']
+ return self._data.get('status') or ''
def __repr__(self):
return '<%s>' % self._jid