From 7f1e9b080c33272004374ac760aa2f346f9a22e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 7 Aug 2021 01:08:10 +0200 Subject: plugin_e2ee: handle empty args in /foo_state commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/plugin_e2ee.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index c35e9935..3ac88eb9 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -291,6 +291,12 @@ class E2EEPlugin(BasePlugin): @command_args_parser.quoted(2) def __command_set_state_global(self, args, state='') -> None: + if not args: + self.api.information( + 'No fingerprint provided to the command..', + 'Error', + ) + return jid, fpr = args if state not in self._all_trust_states: self.api.information( -- cgit v1.2.3