From 25bb3501ec785f35a54d956af249a4586e6dc2cc Mon Sep 17 00:00:00 2001
From: mathieui <mathieui@mathieui.net>
Date: Sun, 14 Oct 2012 15:31:48 +0200
Subject: Should boost the roster speed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- use a generator instead of a listcomp
- don’t use a JID for the resource
---
 src/contact.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src')

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):
-- 
cgit v1.2.3