From 039407f98b41797a3b934fa5a42eac798374879d Mon Sep 17 00:00:00 2001 From: Jiri Otoupal Date: Mon, 30 Oct 2023 15:24:17 +0100 Subject: [PATCH] message fix --- abst/bastion_support/oci_bastion.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/abst/bastion_support/oci_bastion.py b/abst/bastion_support/oci_bastion.py index f93c0d0..c2f6f05 100644 --- a/abst/bastion_support/oci_bastion.py +++ b/abst/bastion_support/oci_bastion.py @@ -576,9 +576,10 @@ def __run_ssh_tunnel(self, ssh_tunnel_arg_str, shell, already_split=False): rich.print( f"({self.get_print_name()}) " f"Please check you configuration, for more info use --debug flag") - rich.print("[red]If this continues to happen without connection it can be because ip changed in [" - "yellow]~/.ssh/known_hosts[/yellow], delete it and" - " try again[/red]") + if self.tries <= 5: + rich.print("[red]If this continues to happen without connection it can be because ip changed in [" + "yellow]~/.ssh/known_hosts[/yellow], delete it and" + " try again[/red]") if self.tries <= 0: self.kill() self.current_status = "Failed"