diff options
author | imarom <imarom@cisco.com> | 2016-12-25 12:54:09 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-25 13:50:56 +0200 |
commit | 34cb66c9f06c7a43e68a17b4a8802f8d34298a65 (patch) | |
tree | aa6b081213e5715cf09a18503cc7b0a20168c6fc /scripts/automation/trex_control_plane/stl/console | |
parent | 549f2750ab22db5695a8d29575c136ab06e37235 (diff) |
refactor layer config on prot attributes
added guard against unconfigured MAC when going up with empty config
file
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/console/trex_console.py | 9 |
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')) |