Skip to content

Commit

Permalink
Update vyos_ssh.py
Browse files Browse the repository at this point in the history
Add exit_config_mode in method save_config and fix rewrite output
  • Loading branch information
ovikosta authored Sep 27, 2023
1 parent d281542 commit 6370d79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netmiko/vyos/vyos_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6370d79

Please sign in to comment.