STL API: fix split batch to chunks - don't stop at chunk with error, return all the... 14/5314/1
authorYaroslav Brustinov <[email protected]>
Mon, 12 Dec 2016 14:27:44 +0000 (16:27 +0200)
committerYaroslav Brustinov <[email protected]>
Mon, 19 Dec 2016 09:23:47 +0000 (11:23 +0200)
Change-Id: I50162301054500585ecfffcdaad78992cfda9b0e
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py

index 51e93f5..72c9317 100644 (file)
@@ -45,18 +45,12 @@ class BatchMessage(object):
                 new_batch.append(msg)
                 if size > chunk_size:
                     batch_json = json.dumps(new_batch)
-                    response = self.rpc_client.send_msg(batch_json)
-                    if not response:
-                        return response
-                    response_batch.add(response)
+                    response_batch.add(self.rpc_client.send_msg(batch_json))
                     size = 0
                     new_batch = []
             if new_batch:
                 batch_json = json.dumps(new_batch)
-                response = self.rpc_client.send_msg(batch_json)
-                if not response:
-                    return response
-                response_batch.add(response)
+                response_batch.add(self.rpc_client.send_msg(batch_json))
             return response_batch
         else:
             batch_json = json.dumps(self.batch_list)