Mercurial > libervia-backend
diff libervia/backend/memory/disco.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 | 554a87ae17a6 |
children | 17fa953c8cd7 |
line wrap: on
line diff
--- a/libervia/backend/memory/disco.py Tue Dec 03 00:53:18 2024 +0100 +++ b/libervia/backend/memory/disco.py Wed Dec 11 01:17:09 2024 +0200 @@ -305,7 +305,7 @@ ) items = disco.DiscoItems() - defer.returnValue(items) + return items def _infos_eb(self, failure_, entity_jid): failure_.trap(StanzaError) @@ -480,15 +480,13 @@ extensions[form_type or ""] = fields - defer.returnValue( - ( - [str(f) for f in disco_infos.features], - [ - (cat, type_, name or "") - for (cat, type_), name in list(disco_infos.identities.items()) - ], - extensions, - ) + return ( + [str(f) for f in disco_infos.features], + [ + (cat, type_, name or "") + for (cat, type_), name in list(disco_infos.identities.items()) + ], + extensions, ) def items2tuples(self, disco_items): @@ -516,5 +514,4 @@ client = self.host.get_client(profile_key) entity = jid.JID(entity_jid_s) disco_items = yield self.get_items(client, entity, node, use_cache) - ret = list(self.items2tuples(disco_items)) - defer.returnValue(ret) + return list(self.items2tuples(disco_items))