fix(papi): do not check client in async 02/41402/1
authorVratko Polak <vrpolak@cisco.com>
Fri, 9 Aug 2024 12:32:58 +0000 (14:32 +0200)
committerVratko Polak <vrpolak@cisco.com>
Fri, 9 Aug 2024 12:32:58 +0000 (14:32 +0200)
This is primarily to avoid excessive logging
in scenarios with multiple get_replies (not just .add) per session.

Change-Id: Ic5b1c295965cd8d32c71a7851ec7823568483b06
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
resources/libraries/python/PapiExecutor.py

index 04dc0d9..e685f87 100644 (file)
@@ -1065,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.
@@ -1088,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):