]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: don't fail topotests if bundle file not present
authorMark Stapp <mjs@voltanet.io>
Thu, 9 Jul 2020 16:13:55 +0000 (12:13 -0400)
committerMark Stapp <mjs@voltanet.io>
Thu, 9 Jul 2020 16:13:55 +0000 (12:13 -0400)
Test for the existence of the support_bundle conf file before
trying to access it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
tests/topotests/lib/topotest.py

index 22ed4b4d0f21760b221280a90e3a4e4ee8dca3a7..bffb8208e73655646672c5295eabb93fb522d41f 100644 (file)
@@ -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)
         )