Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Nov 24, 2023
1 parent 6c09c6b commit da1fd18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 2 additions & 5 deletions libvirtnbdbackup/ssh/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
SFTPClient,
SSHException,
AuthenticationException,
BadHostKeyException,
)

from libvirtnbdbackup.ssh import exceptions
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit da1fd18

Please sign in to comment.