# HG changeset patch # User Goffi # Date 1527238321 -7200 # Node ID 9446f1ea9eac93596dd1428c54af19ed927fd2c8 # Parent 93d64ce7a429e59ee334e2d00b5395366fc5d1d0 core: discoFindByFeatures now return only available resources diff -r 93d64ce7a429 -r 9446f1ea9eac sat/core/sat_main.py --- a/sat/core/sat_main.py Fri May 25 10:52:01 2018 +0200 +++ b/sat/core/sat_main.py Fri May 25 10:52:01 2018 +0200 @@ -728,7 +728,7 @@ resources = [None] else: try: - resources = self.memory.getAllResources(client, jid_) + resources = self.memory.getAvailableResources(client, jid_) except exceptions.UnknownEntityError: continue for resource in resources: diff -r 93d64ce7a429 -r 9446f1ea9eac sat/memory/memory.py --- a/sat/memory/memory.py Fri May 25 10:52:01 2018 +0200 +++ b/sat/memory/memory.py Fri May 25 10:52:01 2018 +0200 @@ -655,6 +655,7 @@ @raise exceptions.UnknownEntityError: if entity is not in cache @raise ValueError: entity_jid has a resource """ + # FIXME: is there a need to keep cache data for resources which are not connected anymore? if entity_jid.resource: raise ValueError("getAllResources must be used with a bare jid (got {})".format(entity_jid)) profile_cache = self._getProfileCache(client) diff -r 93d64ce7a429 -r 9446f1ea9eac sat_frontends/tools/xmlui.py --- a/sat_frontends/tools/xmlui.py Fri May 25 10:52:01 2018 +0200 +++ b/sat_frontends/tools/xmlui.py Fri May 25 10:52:01 2018 +0200 @@ -266,7 +266,7 @@ def _defaultCb(self, data, cb_id, profile): # TODO: when XMLUI updates will be managed, the _xmluiClose - # must be called only if there is not update + # must be called only if there is no update self._xmluiClose() self.host.actionManager(data, profile=profile)