summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/console/trex_console.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py
index 627761ff..7d47128b 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -373,8 +373,13 @@ class TRexConsole(TRexGeneralCmd):
print("No ports acquired\n")
return
- with self.stateless_client.logger.supress():
- table = stl_map_ports(self.stateless_client, ports = ports)
+
+ try:
+ with self.stateless_client.logger.supress():
+ table = stl_map_ports(self.stateless_client, ports = ports)
+ except STLError as e:
+ print(format_text(e.brief() + "\n", 'bold'))
+ return
print(format_text('\nAcquired ports topology:\n', 'bold', 'underline'))