From c424de75e561b2197d29812b3900db58a06096d7 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Tue, 4 Jun 2019 12:33:32 +0200 Subject: stats: removing empty object in stats vector Type: fix Change-Id: I9b6bdacdb9a0750834de9a93d8c3f7ed827ce3c8 Signed-off-by: Ole Troan --- src/vpp-api/python/vpp_papi/vpp_stats.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/vpp-api/python/vpp_papi') diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py index 86a80ddc328..76ccf1042f6 100644 --- a/src/vpp-api/python/vpp_papi/vpp_stats.py +++ b/src/vpp-api/python/vpp_papi/vpp_stats.py @@ -199,7 +199,9 @@ class VPPStats(object): while time.time() < poll_end_time: rv = self.api.stat_segment_connect_r(socketname.encode('utf-8'), self.client) - if rv == 0: + # Break out if success or any other error than "no such file" + # (indicating that VPP hasn't started yet) + if rv == 0 or ffi.errno != 2: break if rv != 0: -- cgit 1.2.3-korg