summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2021-08-07 01:08:10 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2021-08-07 01:08:10 +0200
commit7f1e9b080c33272004374ac760aa2f346f9a22e9 (patch)
tree4e9a8a50d07641d59529af455063d1d4c708e347
parent00a91774fc93a6555120ed61946194d0499063bf (diff)
downloadpoezio-7f1e9b080c33272004374ac760aa2f346f9a22e9.tar.gz
poezio-7f1e9b080c33272004374ac760aa2f346f9a22e9.tar.bz2
poezio-7f1e9b080c33272004374ac760aa2f346f9a22e9.tar.xz
poezio-7f1e9b080c33272004374ac760aa2f346f9a22e9.zip
plugin_e2ee: handle empty args in /foo_state commands
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/plugin_e2ee.py6
1 files changed, 6 insertions, 0 deletions
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(