diff options
author | Vratko Polak <vrpolak@cisco.com> | 2024-08-07 13:02:54 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2024-08-07 13:02:54 +0200 |
commit | 8204112a23fedf6743ca490392a7cf05c6fc033f (patch) | |
tree | f65ab97589a660d948803c5c83b5f529367136fd /resources | |
parent | c9b4857a1ca0246bfc88a2f0bb33505460636a66 (diff) |
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 <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/PapiExecutor.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |