comparison libervia/backend/plugins/plugin_xep_0060.py @ 4341:e9971a4b0627

remove uses of twisted.internet.defer.returnValue This function has been deprecated in Twisted 24.7.0.
author Povilas Kanapickas <povilas@radix.lt>
date Wed, 11 Dec 2024 01:17:09 +0200
parents 111dce64dcb5
children
comparison
equal deleted inserted replaced
4340:ea72364131d5 4341:e9971a4b0627
962 # for publisher, node in data.items(): 962 # for publisher, node in data.items():
963 # if node not in found_nodes: 963 # if node not in found_nodes:
964 # log.debug(u"Skip the items retrieval for [{node}]: node doesn't exist".format(node=node)) 964 # log.debug(u"Skip the items retrieval for [{node}]: node doesn't exist".format(node=node))
965 # continue # avoid pubsub "item-not-found" error 965 # continue # avoid pubsub "item-not-found" error
966 # d_dict[publisher] = self.get_items(service, node, max_items, None, sub_id, rsm, client.profile) 966 # d_dict[publisher] = self.get_items(service, node, max_items, None, sub_id, rsm, client.profile)
967 # defer.returnValue(d_dict) 967 # return d_dict
968 968
969 def getOptions( 969 def getOptions(
970 self, 970 self,
971 service, 971 service,
972 nodeIdentifier, 972 nodeIdentifier,
1665 # for nodeIdentifier in (set(nodeIdentifiers) - set(subscribed_nodes)): 1665 # for nodeIdentifier in (set(nodeIdentifiers) - set(subscribed_nodes)):
1666 # if nodeIdentifier not in found_nodes: 1666 # if nodeIdentifier not in found_nodes:
1667 # log.debug(u"Skip the subscription to [{node}]: node doesn't exist".format(node=nodeIdentifier)) 1667 # log.debug(u"Skip the subscription to [{node}]: node doesn't exist".format(node=nodeIdentifier))
1668 # continue # avoid sat-pubsub "SubscriptionExists" error 1668 # continue # avoid sat-pubsub "SubscriptionExists" error
1669 # d_list.append(client.pubsub_client.subscribe(service, nodeIdentifier, sub_jid or client.pubsub_client.parent.jid.userhostJID(), options=options)) 1669 # d_list.append(client.pubsub_client.subscribe(service, nodeIdentifier, sub_jid or client.pubsub_client.parent.jid.userhostJID(), options=options))
1670 # defer.returnValue(d_list) 1670 # return d_list
1671 1671
1672 # get # 1672 # get #
1673 1673
1674 def _get_from_many_rt_result(self, session_id, profile_key=C.PROF_KEY_DEFAULT): 1674 def _get_from_many_rt_result(self, session_id, profile_key=C.PROF_KEY_DEFAULT):
1675 """Get real-time results for get_from_many session 1675 """Get real-time results for get_from_many session