Skip to content

Commit

Permalink
Fix vty command
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d committed Oct 6, 2023
1 parent fab9d2e commit f4fc01b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/anycastd/prefix/frrouting.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ async def _run_vtysh_commands(self, commands: tuple[str, ...]) -> str:
Raises:
RuntimeError: The command exited with a non-zero exit code.
"""
vty_cmd = "\n".join(commands)
proc = await asyncio.create_subprocess_exec(
self.vtysh, "-c", *commands, stdout=subprocess.PIPE, stderr=subprocess.PIPE
self.vtysh, "-c", vty_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)

stdout, stderr = await proc.communicate()
Expand Down

0 comments on commit f4fc01b

Please sign in to comment.