From 7172f19da43c08d3b2f3a6261e6d6cd422351708 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Thu, 9 Jul 2020 12:13:55 -0400 Subject: [PATCH] tests: don't fail topotests if bundle file not present Test for the existence of the support_bundle conf file before trying to access it. Signed-off-by: Mark Stapp --- tests/topotests/lib/topotest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 22ed4b4d0f..bffb8208e7 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1180,9 +1180,11 @@ class Router(Node): def startRouterDaemons(self, daemons=None): "Starts all FRR daemons for this router." - bundle_data = subprocess.check_output( - ["cat /etc/frr/support_bundle_commands.conf"], shell=True - ) + bundle_data = '' + + if os.path.exists('/etc/frr/support_bundle_commands.conf'): + bundle_data = subprocess.check_output( + ["cat /etc/frr/support_bundle_commands.conf"], shell=True) self.cmd( "echo '{}' > /etc/frr/support_bundle_commands.conf".format(bundle_data) ) -- 2.39.5