From 7e7fedcb40f12d25c51ac29fd2a387936e0bef7c Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Mon, 15 Jun 2020 14:44:05 +0200 Subject: [PATCH] tools: fix frr-reload.py daemon option the refactored frr-reload.py is adding 'no-header' to the 'show running' command of vtysh, but if a daemon is specified the no-header option should only be added after the daemon name. Signed-off-by: Emanuele Di Pascale --- tools/frr-reload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index bdba65ee2f..151db6e4f7 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -146,9 +146,10 @@ class Vtysh(object): return stdout.decode('UTF-8') def mark_show_run(self, daemon = None): - cmd = 'show running-config no-header' + cmd = 'show running-config' if daemon: cmd += ' %s' % daemon + cmd += ' no-header' show_run = self._call_cmd(cmd, stdout=subprocess.PIPE) mark = self._call(['-m', '-f', '-'], stdin=show_run.stdout, stdout=subprocess.PIPE)