pkgs/clan: Fix clan ssh subcommand

This commit is contained in:
a-kenji
2025-06-26 14:55:16 +02:00
committed by Jörg Thalheim
parent c079d6b65f
commit 6a911c97a3

View File

@@ -93,13 +93,14 @@ class DeployInfo:
def find_reachable_host(deploy_info: DeployInfo) -> Remote | None: def find_reachable_host(deploy_info: DeployInfo) -> Remote | None:
host = None # If we only have one address, we have no choice but to use it.
if len(deploy_info.addrs) == 1:
return deploy_info.addrs[0]
for addr in deploy_info.addrs: for addr in deploy_info.addrs:
if addr.is_ssh_reachable(): if addr.is_ssh_reachable():
host = addr return addr
break return None
return host
def ssh_shell_from_deploy(deploy_info: DeployInfo) -> None: def ssh_shell_from_deploy(deploy_info: DeployInfo) -> None: