From c8cff3ced1afd20a041bc36a185540dab72cc56d Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Tue, 30 May 2017 20:24:20 -0700 Subject: [PATCH] lib: Fix stopRouter not to fail for case if daemon was never started Fixes the issue for topotest to fail ot end of skipped LDP test on a system without MPLS support Signed-off-by: Martin Winter --- tests/topotests/lib/topotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 6572bc3390..b5505d559c 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -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): -- 2.39.5