From 0bd2c9ce6c5264b9b3a9a6e42286edae389ebce4 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Wed, 11 May 2016 13:27:22 +0300 Subject: add more example for client api --- scripts/automation/trex_control_plane/doc_stl/api/client_code.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/automation/trex_control_plane/doc_stl/api/client_code.rst') diff --git a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst index d3e48dab..165a9a0d 100755 --- a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst +++ b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst @@ -42,6 +42,11 @@ Example 1 - Typical Python API:: # block until done c.wait_on_traffic(ports = [0, 1]) + + # check for any warnings + if c.get_warnings(): + # handle warnings here + pass finally: c.disconnect() -- cgit 1.2.3-korg