From 6370d79a789f3ba2f2baf46d816d31a1a33e1e89 Mon Sep 17 00:00:00 2001 From: OviKosta Date: Wed, 27 Sep 2023 23:11:02 +0300 Subject: [PATCH] Update vyos_ssh.py Add exit_config_mode in method save_config and fix rewrite output --- netmiko/vyos/vyos_ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netmiko/vyos/vyos_ssh.py b/netmiko/vyos/vyos_ssh.py index 97e1cb59e..9198f0a65 100644 --- a/netmiko/vyos/vyos_ssh.py +++ b/netmiko/vyos/vyos_ssh.py @@ -137,9 +137,10 @@ def save_config( ) -> str: """Saves Config.""" output = self.config_mode() - output = super().save_config( + output += super().save_config( cmd=cmd, confirm=confirm, confirm_response=confirm_response ) + output += self.exit_config_mode() if "Done" not in output: raise ValueError(f"Save failed with following errors:\n\n{output}") return output