diff sat/memory/memory.py @ 3206:ae09989e9feb

core, bridge: new `devicesInfosGet` method to get infos on known devices of an entity
author Goffi <goffi@goffi.org>
date Fri, 06 Mar 2020 18:19:03 +0100
parents 39d7327583e1
children 6cf4bd6972c2
line wrap: on
line diff
--- a/sat/memory/memory.py	Fri Mar 06 18:19:03 2020 +0100
+++ b/sat/memory/memory.py	Fri Mar 06 18:19:03 2020 +0100
@@ -17,19 +17,18 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from sat.core.i18n import _
-
-from sat.core.log import getLogger
-
-log = getLogger(__name__)
-
 import os.path
 import copy
+import shortuuid
+import mimetypes
+import time
+from uuid import uuid4
 from collections import namedtuple
-from uuid import uuid4
 from twisted.python import failure
 from twisted.internet import defer, reactor, error
 from twisted.words.protocols.jabber import jid
+from sat.core.i18n import _
+from sat.core.log import getLogger
 from sat.core import exceptions
 from sat.core.constants import Const as C
 from sat.memory.sqlite import SqliteStorage
@@ -40,9 +39,9 @@
 from sat.memory.crypto import PasswordHasher
 from sat.tools import config as tools_config
 from sat.tools.common import data_format
-import shortuuid
-import mimetypes
-import time
+
+
+log = getLogger(__name__)
 
 
 PresenceTuple = namedtuple("PresenceTuple", ("show", "priority", "statuses"))
@@ -690,7 +689,7 @@
         """Return all resource from jid for which we have had data in this session
 
         @param entity_jid: bare jid of the entity
-        return (list[unicode]): list of resources
+        return (set[unicode]): set of resources
 
         @raise exceptions.UnknownEntityError: if entity is not in cache
         @raise ValueError: entity_jid has a resource