mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 08:01:57 +00:00
Expose pty reference from TerminadoMiniServer
This commit is contained in:
parent
cc2c6009dd
commit
b7f9acd3b0
@ -10,15 +10,20 @@ log = logging.getLogger(__name__)
|
||||
class TerminadoMiniServer:
|
||||
def __init__(self, url, port, workdir, shellcmd):
|
||||
self.port = port
|
||||
self.term_manager = UniqueTermManager(shell_command=shellcmd,
|
||||
term_settings={'cwd': workdir})
|
||||
self.application = Application(
|
||||
[(
|
||||
url,
|
||||
TerminadoMiniServer.CORSTermSocket,
|
||||
{'term_manager': UniqueTermManager(shell_command=shellcmd,
|
||||
term_settings={'cwd': workdir})}
|
||||
{'term_manager': self.term_manager}
|
||||
)]
|
||||
)
|
||||
|
||||
@property
|
||||
def pty(self):
|
||||
return self.term_manager.terminal.ptyproc
|
||||
|
||||
class CORSTermSocket(TermSocket):
|
||||
def check_origin(self, origin):
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user