From 8204112a23fedf6743ca490392a7cf05c6fc033f Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 7 Aug 2024 13:02:54 +0200 Subject: fix(papi): Do not check CRC on None None can happen when VPP crashes (and pipe is not detected as broken yet) or stalls. Avoid CRC check in that case, raise early with error message. Change-Id: I15a957420320affd72dbd99fa48c309b28f0511a Signed-off-by: Vratko Polak --- resources/libraries/python/PapiExecutor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'resources/libraries') diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py index a55638ab7c..04dc0d99e5 100644 --- a/resources/libraries/python/PapiExecutor.py +++ b/resources/libraries/python/PapiExecutor.py @@ -1051,6 +1051,10 @@ class PapiSocketExecutor: PapiSocketExecutor._drain(vpp_instance, err_msg) # Process replies for this command. for reply in replies: + if reply is None: + raise RuntimeError( + f"{err_msg}\nNo reply to sync call. VPP crashed?" + ) self.crc_checker.check_api_name(reply.__class__.__name__) dictized_reply = dictize_and_check_retval(reply, err_msg) ret_list.append(dictized_reply) -- cgit 1.2.3-korg