From f11d01a06951ae9e55f16f1982b08f4552408014 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 4 Jan 2017 17:38:21 +0200 Subject: console: move show_intro into try-finally to ensure release of ports Change-Id: Icfe30379a24560cf0807edd239d3eb07d81a492f Signed-off-by: Yaroslav Brustinov --- .../trex_control_plane/stl/console/trex_console.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'scripts/automation/trex_control_plane/stl/console') 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 cecdd72e..c9956472 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -906,17 +906,16 @@ def main(): if options.readonly: logger.log(format_text("\nRead only mode - only few commands will be available", 'bold')) - show_intro(logger, stateless_client) - - - # a script mode - if options.batch: - cont = run_script_file(options.batch[0], stateless_client) - if not cont: - return - # console try: + show_intro(logger, stateless_client) + + # a script mode + if options.batch: + cont = run_script_file(options.batch[0], stateless_client) + if not cont: + return + console = TRexConsole(stateless_client, options.verbose) logger.prompt_redraw = console.prompt_redraw -- cgit 1.2.3-korg