diff options
author | 2016-01-12 09:47:24 -0500 | |
---|---|---|
committer | 2016-01-12 09:49:53 -0500 | |
commit | 898fadae0e9bf9d0eb46abf286a888d791bdaf96 (patch) | |
tree | 43e6e6cf91a0d48aadf5aba420e25c5b107ab53b /scripts/automation/trex_control_plane/console/trex_console.py | |
parent | 7ce793d732d7692a60672db7f9e4f1bac9cad81e (diff) |
perfectionist's job is never done - fixed the console prompt redraw when
an async event occurs so it looks nice
Diffstat (limited to 'scripts/automation/trex_control_plane/console/trex_console.py')
-rwxr-xr-x | scripts/automation/trex_control_plane/console/trex_console.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py index 49d58fe0..3e9dec47 100755 --- a/scripts/automation/trex_control_plane/console/trex_console.py +++ b/scripts/automation/trex_control_plane/console/trex_console.py @@ -116,6 +116,8 @@ class TRexConsole(TRexGeneralCmd): def __init__(self, stateless_client, verbose=False): self.stateless_client = stateless_client + self.stateless_client.set_prompt_redraw_cb(self.prompt_redraw) + TRexGeneralCmd.__init__(self) self.tui = trex_tui.TrexTUI(stateless_client) @@ -130,6 +132,9 @@ class TRexConsole(TRexGeneralCmd): ################### internal section ######################## + def prompt_redraw (self): + sys.stdout.write(self.prompt) + def verify_connected(f): @wraps(f) def wrap(*args): |