From 9ad801e8fef76f90b33672e823014161d1dfe7b5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 19 Feb 2024 14:02:31 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index c33a42f..8b811af 100755 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -173,10 +173,8 @@ class PythonScriptProcessor(BaseProcessor): async def loadScript(self, path): data = '' - print(f'loadScript(), {path=}, {data=}') async with aiofiles.open(path,'r', encoding='utf-8') as f: data = await f.read() - print(f'loadScript(), {path=}, {data=}') b= ''.join(data.split('\r')) lines = b.split('\n') lines = ['\t' + l for l in lines ] @@ -187,9 +185,7 @@ class PythonScriptProcessor(BaseProcessor): await self.set_run_env(request, params=params) lenv = self.run_ns del lenv['request'] - filename = self.resource.url2file(request.path) - print(f'ScriptProcessor():{filename=}, {self.real_path=}') - txt = await self.loadScript(filename) + txt = await self.loadScript(self.real_path) # print(self.real_path, "#########", txt) exec(txt,lenv,lenv) func = lenv['myfunc']