diff --git a/lib/tfw/components/terminado_event_handler.py b/lib/tfw/components/terminado_event_handler.py index 9ae7dae..9368f34 100644 --- a/lib/tfw/components/terminado_event_handler.py +++ b/lib/tfw/components/terminado_event_handler.py @@ -27,5 +27,6 @@ class TerminadoEventHandler(TriggerlessEventHandler): self.terminado_server.pty.write(data['shellcmd']) def read(self, data): - data['history'] = self.monitor.history[-int(data.get('count', 1)):] + data['count'] = int(data.get('count', 1)) + data['history'] = self.monitor.history[-data['count']:] return data