aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2017-03-28 18:20:52 +0200
committerJan Gelety <jgelety@cisco.com>2017-03-28 18:20:52 +0200
commit80a11ac1d0f9da305bb9ec97507294f56c794496 (patch)
tree034e2923f7de777e73e7a711cf4d27ee161d6a75 /resources/libraries
parent60c84c733c506056d8472acc701e1cdf14e6f324 (diff)
Use "No VPP PID found on node X" when vpp pid is not returned
Change-Id: Idfe6d674355bf57fdc24219cdaf8664ec23dfce9 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/DUTSetup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index 1f87f03cb9..275a546fd8 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -123,10 +123,14 @@ class DUTSetup(object):
raise RuntimeError('Not possible to get PID of VPP process on node:'
' {}'.format(node['host']))
- if len(stdout.splitlines()) != 1:
+ if len(stdout.splitlines()) == 1:
+ return int(stdout)
+ elif len(stdout.splitlines()) == 0:
+ raise RuntimeError("No VPP PID found on node {0}".
+ format(node['host']))
+ else:
raise RuntimeError("More then one VPP PID found on node {0}".
format(node['host']))
- return int(stdout)
@staticmethod
def get_vpp_pids(nodes):