From 7ccc1de1346ede1049cd22b9fa94e6d488f03868 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 May 2023 22:58:31 +0800 Subject: [PATCH] bugfix --- ahserver/filestorage.py | 6 +++--- ahserver/processorResource.py | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ahserver/filestorage.py b/ahserver/filestorage.py index 5a372b1..92e8494 100755 --- a/ahserver/filestorage.py +++ b/ahserver/filestorage.py @@ -22,7 +22,7 @@ class TmpFileRecord: self.filename = self.savefilename() self.loop = asyncio.get_event_loop() self.loop.call_later(0.01, self.load) - print('TmpFileRecord() .........................') + # print('TmpFileRecord() .........................') def newtmpfile(self, path:str): self.filetime[path] = time.time() @@ -44,7 +44,7 @@ class TmpFileRecord: self.change_flg = False async def load(self): - print('load() called ............') + # print('load() called ............') fn = self.filename if not os.path.isfile(fn): return @@ -110,6 +110,6 @@ class FileStorage: siz += len(d); await f.write(d) await f.flush() - print(f'{name=} file({fpath}) write {siz} bytes') + # print(f'{name=} file({fpath}) write {siz} bytes') self.tfr.newtmpfile(fpath) return fpath diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index 84a97a4..cac8873 100755 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -102,7 +102,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): def abspath(self, request, path:str): url = self.entireUrl(request, path) fname = self.url2file(url) - print(f'abspath():, {path=}, {url=}, {fname=}') return fname async def getPostData(self,request: Request) -> dict: @@ -227,7 +226,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): self.user = await auth.get_auth(request) self.y_env.user = self.user self.request_filename = self.url2file(str(request.path)) - print(f'225:{request.path=}, {self.request_filename=}') path = request.path config = getConfig() if config.website.dbadm and path.startswith(config.website.dbadm): @@ -312,13 +310,11 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): return False def url2processor(self, request, url, fpath): - print('fpath=', fpath) config = getConfig() url = self.entireUrl(request, url) host = '/'.join(str(request.url).split('/')[:3]) path = request.path real_path = self.abspath(request, path) - print(f'url2processor():{path=}, {real_path=}') if config.website.startswiths: for a in config.website.startswiths: if path.startswith(a.leading): @@ -351,7 +347,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): async def path_call(self, request, path, params={}): url = self.entireUrl(request, path) fpath = self.url2file(url) - print(f'path_call():{path=}, {url=}, {fpath=}') processor = self.url2processor(request, url, fpath) return await processor.path_call(request, params=params)