summaryrefslogtreecommitdiffstats
path: root/tools/frr-reload.py
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2017-05-17 02:23:38 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2017-05-17 02:23:38 +0200
commitec3fd9577411a4555a9988f8187e2d1598cd2b00 (patch)
treee5ff85e56a9005ee8b5d488137378213a9c43393 /tools/frr-reload.py
parentfrr-reload.py fails on "no debug ospf6 message unknown" (diff)
downloadfrr-ec3fd9577411a4555a9988f8187e2d1598cd2b00.tar.xz
frr-ec3fd9577411a4555a9988f8187e2d1598cd2b00.zip
tools: frr-reload.py VtyshMarkException needs to include "vtysh -m"
output Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'tools/frr-reload.py')
-rwxr-xr-xtools/frr-reload.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 090937ed2..11e0bdc68 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -109,9 +109,12 @@ class Config(object):
log.info('Loading Config object from file %s', filename)
try:
- file_output = subprocess.check_output(['/usr/bin/vtysh', '-m', '-f', filename])
+ file_output = subprocess.check_output(['/usr/bin/vtysh', '-m', '-f', filename],
+ stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
- raise VtyshMarkException(str(e))
+ ve = VtyshMarkException(e)
+ ve.output = e.output
+ raise ve
for line in file_output.split('\n'):
line = line.strip()
@@ -134,9 +137,11 @@ class Config(object):
try:
config_text = subprocess.check_output(
"/usr/bin/vtysh -c 'show run' | /usr/bin/tail -n +4 | /usr/bin/vtysh -m -f -",
- shell=True)
+ shell=True, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
- raise VtyshMarkException(str(e))
+ ve = VtyshMarkException(e)
+ ve.output = e.output
+ raise ve
for line in config_text.split('\n'):
line = line.strip()