summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/console/trex_console.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-26 17:26:00 +0200
committerimarom <imarom@cisco.com>2017-01-26 17:34:28 +0200
commitacf815dbf67d7a3be8fefd84eea1d25465f71136 (patch)
tree6d6b68dd250cdc910c6aa51858532b1844dae868 /scripts/automation/trex_control_plane/stl/console/trex_console.py
parent3689edf311778c8cb921db61f293db6cd43a9b14 (diff)
code review - few cleanups
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py5
1 files changed, 3 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 83f36820..d36ce7b0 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -175,6 +175,8 @@ class TRexConsole(TRexGeneralCmd):
def __init__(self, stateless_client, verbose = False):
+ # cmd lock is used to make sure background job
+ # of the console is not done while the user excutes commands
self.cmd_lock = Lock()
self.stateless_client = stateless_client
@@ -721,6 +723,7 @@ class TRexConsole(TRexGeneralCmd):
continue
finally:
+ # capture manager is not presistent - kill it before going out
self.cap_mngr.stop()
if self.terminal:
@@ -955,8 +958,6 @@ def main():
stateless_client.disconnect(stop_traffic = False)
-
if __name__ == '__main__':
-
main()