plugin_e2ee: _decrypt_wrapper doesn't need a return type

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-12 00:29:03 +01:00
parent 191702a185
commit 87cb79aa71

View file

@ -374,13 +374,13 @@ class E2EEPlugin(BasePlugin):
return None
return result
async def _decrypt_wrapper(self, stanza: Message, tab: Optional[ChatTabs]) -> Optional[Message]:
async def _decrypt_wrapper(self, stanza: Message, tab: Optional[ChatTabs]) -> None:
"""
Wrapper around _decrypt() to handle errors and display the message after encryption.
"""
try:
# pylint: disable=unexpected-keyword-arg
result = await self._decrypt(stanza, tab, passthrough=True)
await self._decrypt(stanza, tab, passthrough=True)
except Exception as exc:
jid = stanza['to']
tab = self.core.tabs.by_name_and_class(jid, ChatTab)
@ -394,7 +394,7 @@ class E2EEPlugin(BasePlugin):
# TODO: display exceptions to the user properly
log.error('Exception in decrypt:', exc_info=True)
return None
return result
return None
async def _decrypt_encryptedtag(self, stanza: Message) -> None:
"""