diff --git a/Changelog b/Changelog index 6a36bcf3..5d406d99 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +Version 1.9.48 +--------- + * Rework some error messages / exception handling. + Version 1.9.47 --------- * Remote backup: catch more exceptions accordingly, provide better diff --git a/libvirtnbdbackup/ssh/client.py b/libvirtnbdbackup/ssh/client.py index 9002b64e..67db489d 100644 --- a/libvirtnbdbackup/ssh/client.py +++ b/libvirtnbdbackup/ssh/client.py @@ -24,7 +24,6 @@ SFTPClient, SSHException, AuthenticationException, - BadHostKeyException, ) from libvirtnbdbackup.ssh import exceptions @@ -72,12 +71,10 @@ def connect(self) -> SSHClient: ) return cli except AuthenticationException as e: - raise exceptions.sshError( - f"AuthenticationException occurred; did you remember to generate an SSH key? {e}" - ) + raise exceptions.sshError(f"SSH key authentication failed: {e}") except socket.gaierror as e: raise exceptions.sshError(f"Unable to connect: {e}") - except BadHostKeyException as e: + except SSHException as e: raise exceptions.sshError(e) except Exception as e: log.exception(e)