summaryrefslogtreecommitdiff
path: root/src/contact.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-10-14 15:31:48 +0200
committermathieui <mathieui@mathieui.net>2012-10-14 15:31:48 +0200
commit25bb3501ec785f35a54d956af249a4586e6dc2cc (patch)
tree43ee96afa983b31a5d8cea11c862042e5660df68 /src/contact.py
parent285c49a0d0e93a30ffad16a1b889edbb7cec9fb7 (diff)
downloadpoezio-25bb3501ec785f35a54d956af249a4586e6dc2cc.tar.gz
poezio-25bb3501ec785f35a54d956af249a4586e6dc2cc.tar.bz2
poezio-25bb3501ec785f35a54d956af249a4586e6dc2cc.tar.xz
poezio-25bb3501ec785f35a54d956af249a4586e6dc2cc.zip
Should boost the roster speed
- use a generator instead of a listcomp - don’t use a JID for the resource
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 7111b1da..0d7276f9 100644
--- a/src/contact.py
+++ b/src/contact.py
@@ -25,7 +25,7 @@ class Resource(object):
"""
data: the dict to use as a source
"""
- self._jid = safeJID(jid) # Full jid
+ self._jid = jid # Full jid
self._data = data
@property
@@ -101,10 +101,10 @@ class Contact(object):
@property
def resources(self):
"""List of the available resources as Resource objects"""
- return [Resource(
+ return (Resource(
'%s%s' % (self.bare_jid, ('/' + key) if key else ''),
self.__item.resources[key]
- ) for key in self.__item.resources.keys()]
+ ) for key in self.__item.resources.keys())
@property
def subscription(self):