Skip to content

Commit

Permalink
Protect possible exception
Browse files Browse the repository at this point in the history
  • Loading branch information
perseoGI committed Dec 27, 2024
1 parent 70e8446 commit 5e21b34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion conan/internal/runner/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def __init__(
self.args = args
self.raw_args = raw_args

hostname = self._create_ssh_connection()
try:
hostname = self._create_ssh_connection()
except Exception as e:
raise ConanException(f"Error creating SSH connection: {e}")
self.logger = SSHOutput(hostname)
self.logger.status(f"Connected to {hostname}", fg=Color.BRIGHT_MAGENTA)
self.remote_conn = RemoteConnection(self.client, self.logger)
Expand Down

0 comments on commit 5e21b34

Please sign in to comment.