From: Martin Winter Date: Wed, 31 May 2017 03:24:20 +0000 (-0700) Subject: lib: Fix stopRouter not to fail for case if daemon was never started X-Git-Tag: frr-7.1-dev~151^2~315 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c8cff3ced1afd20a041bc36a185540dab72cc56d;p=matthieu%2Ffrr.git 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 --- 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):