Expose term_manager in TerminadoMiniServer as a property

This commit is contained in:
Kristóf Tóth 2018-03-06 14:28:36 +01:00
parent 021a122523
commit 555d571112

View File

@ -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,
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