mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 19:11:32 +00:00
Expose term_manager in TerminadoMiniServer as a property
This commit is contained in:
parent
021a122523
commit
555d571112
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user