console: move show_intro into try-finally to ensure release of ports 52/5352/1
authorYaroslav Brustinov <[email protected]>
Wed, 4 Jan 2017 15:38:21 +0000 (17:38 +0200)
committerYaroslav Brustinov <[email protected]>
Wed, 4 Jan 2017 15:38:21 +0000 (17:38 +0200)
Change-Id: Icfe30379a24560cf0807edd239d3eb07d81a492f
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/automation/trex_control_plane/stl/console/trex_console.py

index cecdd72..c995647 100755 (executable)
@@ -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