From f4fc01b9161359fc3d27dd0a65a33a840785fa60 Mon Sep 17 00:00:00 2001 From: Marvin Vogt Date: Fri, 6 Oct 2023 12:08:28 +0000 Subject: [PATCH] Fix vty command --- src/anycastd/prefix/frrouting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/anycastd/prefix/frrouting.py b/src/anycastd/prefix/frrouting.py index 5544e96..e471f50 100644 --- a/src/anycastd/prefix/frrouting.py +++ b/src/anycastd/prefix/frrouting.py @@ -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()