Extract spawning bash as user to a variable

This commit is contained in:
Kristóf Tóth 2018-04-05 14:43:07 +02:00
parent b54c91848b
commit 35421649c9

View File

@ -15,7 +15,8 @@ class TerminadoEventHandler(TriggerlessEventHandler):
super().__init__(key)
self.working_directory = TFWENV.TERMINADO_DIR
self._historymonitor = monitor
self.terminado_server = TerminadoMiniServer('/terminal', TFWENV.TERMINADO_PORT, TFWENV.TERMINADO_WD, ['sudo', '-u', TAOENV.USER, 'bash'])
bash_as_user_cmd = ['sudo', '-u', TAOENV.USER, 'bash']
self.terminado_server = TerminadoMiniServer('/terminal', TFWENV.TERMINADO_PORT, TFWENV.TERMINADO_WD, bash_as_user_cmd)
self.commands = {'write': self.write,
'read': self.read}
if self._historymonitor: