mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 19:41: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:
|
class TerminadoMiniServer:
|
||||||
def __init__(self, url, port, workdir, shellcmd):
|
def __init__(self, url, port, workdir, shellcmd):
|
||||||
self.port = port
|
self.port = port
|
||||||
self.term_manager = SingleTermManager(shell_command=shellcmd,
|
self._term_manager = SingleTermManager(shell_command=shellcmd,
|
||||||
term_settings={'cwd': workdir})
|
term_settings={'cwd': workdir})
|
||||||
self.application = Application(
|
self.application = Application(
|
||||||
[(
|
[(
|
||||||
url,
|
url,
|
||||||
TerminadoMiniServer.CORSTermSocket,
|
TerminadoMiniServer.CORSTermSocket,
|
||||||
{'term_manager': self.term_manager}
|
{'term_manager': self._term_manager}
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def term_manager(self):
|
||||||
|
return self._term_manager
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pty(self):
|
def pty(self):
|
||||||
return self.term_manager.terminal.ptyproc
|
return self.term_manager.terminal.ptyproc
|
||||||
|
Loading…
Reference in New Issue
Block a user