]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix stopRouter not to fail for case if daemon was never started
authorMartin Winter <mwinter@opensourcerouting.org>
Wed, 31 May 2017 03:24:20 +0000 (20:24 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:11 +0000 (20:22 -0500)
Fixes the issue for topotest to fail ot end of skipped LDP test on
a system without MPLS support

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
tests/topotests/lib/topotest.py

index 6572bc3390455a58c6c6af35395e8df7e7dffcfe..b5505d559c3f804eb3ddd75acaf17ff47e5790ba 100644 (file)
@@ -173,7 +173,7 @@ class Router(Node):
         if rundaemons is not None:
             for d in StringIO.StringIO(rundaemons):
                 daemonpid = self.cmd('cat %s' % d.rstrip()).rstrip()
-                if pid_exists(int(daemonpid)):
+                if (daemonpid.isdigit() and pid_exists(int(daemonpid))):
                     self.cmd('kill -7 %s' % daemonpid)
                     self.waitOutput()
     def removeIPs(self):