From 555d5711123510245f018b9e87417cbeb240ef48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 6 Mar 2018 14:28:36 +0100 Subject: [PATCH] Expose term_manager in TerminadoMiniServer as a property --- lib/tfw/components/terminado_mini_server.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/tfw/components/terminado_mini_server.py b/lib/tfw/components/terminado_mini_server.py index 26afe31..691099a 100644 --- a/lib/tfw/components/terminado_mini_server.py +++ b/lib/tfw/components/terminado_mini_server.py @@ -10,16 +10,20 @@ log = logging.getLogger(__name__) class TerminadoMiniServer: def __init__(self, url, port, workdir, shellcmd): self.port = port - self.term_manager = SingleTermManager(shell_command=shellcmd, - term_settings={'cwd': workdir}) + self._term_manager = SingleTermManager(shell_command=shellcmd, + term_settings={'cwd': workdir}) self.application = Application( [( url, TerminadoMiniServer.CORSTermSocket, - {'term_manager': self.term_manager} + {'term_manager': self._term_manager} )] ) + @property + def term_manager(self): + return self._term_manager + @property def pty(self): return self.term_manager.terminal.ptyproc