From 6e40d7f5273e914d1fc299ccd3ec8ef17bec7991 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 19 Jan 2025 21:39:00 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 2 +- ahserver/websocketProcessor.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index bcf1f13..8a716d8 100644 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -76,7 +76,7 @@ class BaseProcessor: kw = await self.run_ns['request2ns']() kw.update(params) self.run_ns['params_kw'] = kw - self.run_ns.update(kw) + # self.run_ns.update(kw) self.run_ns['ref_real_path'] = self.real_path self.run_ns['processor'] = self self.env_set = True diff --git a/ahserver/websocketProcessor.py b/ahserver/websocketProcessor.py index 83e47bd..353f777 100644 --- a/ahserver/websocketProcessor.py +++ b/ahserver/websocketProcessor.py @@ -38,7 +38,12 @@ class XtermProcessor(PythonScriptProcessor): # it must return a DictObject with sshnode information # parameters: nodeid # - login_info = super().path_call(request, params=params) + 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' + + debug(f'{login_info=}') ws = web.WebSocketResponse() await ws.prepare(request) await self.create_process(login_info)