diff options
Diffstat (limited to 'resources/libraries/python/PapiExecutor.py')
-rw-r--r-- | resources/libraries/python/PapiExecutor.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py index a55638ab7c..e685f87a10 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) @@ -1061,6 +1065,8 @@ class PapiSocketExecutor: The messages were already sent by .add() in this mode, local_list is used just so we know how many replies to read. + Similarly to async .add, we do not check connection status here, + thus we avoid needless logging. Beware: It is not clear what to do when socket read fails in the middle of async processing. @@ -1084,7 +1090,7 @@ class PapiSocketExecutor: :rtype: List[UserDict] :raises RuntimeError: If the replies are not all correct. """ - vpp_instance = self.get_connected_client() + vpp_instance = self.get_connected_client(check_connected=False) ret_list = list() try: for index, _ in enumerate(local_list): |