This commit is contained in:
yumoqing 2025-01-25 20:08:12 +08:00
parent 2d154db0f0
commit d921864cb1
2 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,8 @@ async def path_download(request, kw, *params):
return await file_download(request, fp)
rf = RegisterFunction()
rf.register('download_path', path_download)
rf.register('idfile', path_download)

View File

@ -41,15 +41,15 @@ class XtermProcessor(PythonScriptProcessor):
await self.set_run_env(request, params=params)
login_info = await super().path_call(request, params=params)
if login_info is None:
raise f'data error'
raise Exception('data error')
debug(f'{login_info=}')
ws = web.WebSocketResponse()
await ws.prepare(request)
await self.create_process(login_info)
self.ws_sendstr(ws, 'Welcom to sshclient')
r1 = self.ws_2_process(ws)
r2 = self.process_2_ws(ws)
await self.ws_sendstr(ws, 'Welcom to sshclient')
await asyncio.gather(r1,r2)
self.retResponse = ws
return ws