Fix misleading notices in keys import/export commands

This commit is contained in:
Bohdan Horbeshko 2021-06-06 05:21:10 +03:00
parent a4efd87e50
commit 8461ad80f7

View file

@ -811,20 +811,18 @@ def olm_export_command(server, args):
file_path = os.path.expanduser(args.file) file_path = os.path.expanduser(args.file)
try: try:
server.client.export_keys(file_path, args.passphrase) server.client.export_keys(file_path, args.passphrase)
server.info("Successfully exported keys")
except (OSError, IOError) as e: except (OSError, IOError) as e:
server.error("Error exporting keys: {}".format(str(e))) server.error("Error exporting keys: {}".format(str(e)))
server.info("Successfully exported keys")
def olm_import_command(server, args): def olm_import_command(server, args):
file_path = os.path.expanduser(args.file) file_path = os.path.expanduser(args.file)
try: try:
server.client.import_keys(file_path, args.passphrase) server.client.import_keys(file_path, args.passphrase)
server.info("Successfully imported keys")
except (OSError, IOError, EncryptionError) as e: except (OSError, IOError, EncryptionError) as e:
server.error("Error importing keys: {}".format(str(e))) server.error("Error importing keys: {}".format(str(e)))
server.info("Successfully imported keys")
def olm_sas_command(server, args): def olm_sas_command(server, args):
try: try: