summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/console
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-07-06 15:55:03 +0300
committerimarom <imarom@cisco.com>2016-07-06 15:55:03 +0300
commit198a5ae7358d139a935163d739e0343fc899538b (patch)
tree266378be519be7eaee4882da93157f5f2e49ae2b /scripts/automation/trex_control_plane/stl/console
parent1ccf48c7a63d11d51ebf2fedcb80022124503355 (diff)
TUI: crash when history is empty
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console')
-rw-r--r--scripts/automation/trex_control_plane/stl/console/trex_tui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_tui.py b/scripts/automation/trex_control_plane/stl/console/trex_tui.py
index 64aa60ab..32c6b1e0 100644
--- a/scripts/automation/trex_control_plane/stl/console/trex_tui.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_tui.py
@@ -804,7 +804,7 @@ class AsyncKeysEngineConsole:
empty_line = self.lines.popleft()
assert(empty_line.ro_line == '')
- if self.lines[0].ro_line != cmd:
+ if not self.lines or self.lines[0].ro_line != cmd:
self.lines.appendleft(CmdLine(cmd))
# back in