From 8461ad80f76785b474caed869e4d503db6b3b068 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sun, 6 Jun 2021 05:21:10 +0300 Subject: [PATCH] Fix misleading notices in keys import/export commands --- matrix/commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix/commands.py b/matrix/commands.py index 53faf74..8d28070 100644 --- a/matrix/commands.py +++ b/matrix/commands.py @@ -811,20 +811,18 @@ def olm_export_command(server, args): file_path = os.path.expanduser(args.file) try: server.client.export_keys(file_path, args.passphrase) + server.info("Successfully exported keys") except (OSError, IOError) as e: server.error("Error exporting keys: {}".format(str(e))) - server.info("Successfully exported keys") - def olm_import_command(server, args): file_path = os.path.expanduser(args.file) try: server.client.import_keys(file_path, args.passphrase) + server.info("Successfully imported keys") except (OSError, IOError, EncryptionError) as e: server.error("Error importing keys: {}".format(str(e))) - server.info("Successfully imported keys") - def olm_sas_command(server, args): try: