comparison sat/memory/disco.py @ 3751:073f386a191a

core (memory/disco): fix hard encoded value in `findServiceEntity`
author Goffi <goffi@goffi.org>
date Fri, 13 May 2022 17:56:40 +0200
parents 193b56ef58e0
children 524856bd7b19
comparison
equal deleted inserted replaced
3750:193b56ef58e0 3751:073f386a191a
301 """Helper method to find first available entity from findServiceEntities 301 """Helper method to find first available entity from findServiceEntities
302 302
303 args are the same as for [findServiceEntities] 303 args are the same as for [findServiceEntities]
304 @return (jid.JID, None): found entity 304 @return (jid.JID, None): found entity
305 """ 305 """
306 d = self.host.findServiceEntities(client, "pubsub", "service") 306 d = self.host.findServiceEntities(client, category, type_)
307 d.addCallback(lambda entities: entities.pop() if entities else None) 307 d.addCallback(lambda entities: entities.pop() if entities else None)
308 return d 308 return d
309 309
310 def findServiceEntities(self, client, category, type_, jid_=None): 310 def findServiceEntities(self, client, category, type_, jid_=None):
311 """Return all available items of an entity which correspond to (category, type_) 311 """Return all available items of an entity which correspond to (category, type_)