comparison sat/plugins/plugin_pubsub_cache.py @ 3854:8a2c46122a11

plugin XEP-0060: fix bad naming of return variable
author Goffi <goffi@goffi.org>
date Thu, 14 Jul 2022 12:55:30 +0200
parents 604b6acaee22
children c04f5e8a3568
comparison
equal deleted inserted replaced
3853:a56d5ad466b3 3854:8a2c46122a11
278 client, [rsm.NS_RSM, self._p.DISCO_RSM], pubsub_node.service 278 client, [rsm.NS_RSM, self._p.DISCO_RSM], pubsub_node.service
279 ) 279 )
280 except error.StanzaError as e: 280 except error.StanzaError as e:
281 if e.condition == "service-unavailable": 281 if e.condition == "service-unavailable":
282 log.warning( 282 log.warning(
283 "service is hidding disco infos, we'll only cache latest 20 items" 283 "service {service} is hidding disco infos, we'll only cache "
284 "latest 20 items"
284 ) 285 )
285 items, __ = await client.pubsub_client.items( 286 items, __ = await client.pubsub_client.items(
286 pubsub_node.service, pubsub_node.name, maxItems=20 287 pubsub_node.service, pubsub_node.name, maxItems=20
287 ) 288 )
288 await self.cacheItems( 289 await self.cacheItems(