comparison sat/memory/memory.py @ 2597:9446f1ea9eac

core: discoFindByFeatures now return only available resources
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 10:52:01 +0200
parents 26edcf3a30eb
children 56f94936df1e
comparison
equal deleted inserted replaced
2596:93d64ce7a429 2597:9446f1ea9eac
653 return (list[unicode]): list of resources 653 return (list[unicode]): list of resources
654 654
655 @raise exceptions.UnknownEntityError: if entity is not in cache 655 @raise exceptions.UnknownEntityError: if entity is not in cache
656 @raise ValueError: entity_jid has a resource 656 @raise ValueError: entity_jid has a resource
657 """ 657 """
658 # FIXME: is there a need to keep cache data for resources which are not connected anymore?
658 if entity_jid.resource: 659 if entity_jid.resource:
659 raise ValueError("getAllResources must be used with a bare jid (got {})".format(entity_jid)) 660 raise ValueError("getAllResources must be used with a bare jid (got {})".format(entity_jid))
660 profile_cache = self._getProfileCache(client) 661 profile_cache = self._getProfileCache(client)
661 try: 662 try:
662 entity_data = profile_cache[entity_jid.userhostJID()] 663 entity_data = profile_cache[entity_jid.userhostJID()]