Expose pty reference from TerminadoMiniServer

This commit is contained in:
Kristóf Tóth 2018-03-02 17:05:01 +01:00
parent cc2c6009dd
commit b7f9acd3b0

View File

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