summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
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