comparison sat/memory/encryption.py @ 3235:c161ff21ca7c

core (memory/encryption): use utils.asDeferred for trust UI, so async coroutines can be used
author Goffi <goffi@goffi.org>
date Fri, 27 Mar 2020 09:53:59 +0100
parents e756e0eb1be4
children be6d91572633
comparison
equal deleted inserted replaced
3234:78fea49735c5 3235:c161ff21ca7c
377 get_trust_ui = plugin.instance.getTrustUI 377 get_trust_ui = plugin.instance.getTrustUI
378 except AttributeError: 378 except AttributeError:
379 raise NotImplementedError( 379 raise NotImplementedError(
380 "Encryption plugin doesn't handle trust management UI") 380 "Encryption plugin doesn't handle trust management UI")
381 else: 381 else:
382 return defer.maybeDeferred(get_trust_ui, self.client, entity_jid) 382 return utils.asDeferred(get_trust_ui, self.client, entity_jid)
383 383
384 ## Menus ## 384 ## Menus ##
385 385
386 @classmethod 386 @classmethod
387 def _importMenus(cls, host): 387 def _importMenus(cls, host):