From 21143f01383f29a03c2117923f29cccf19a5eaae Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 18 Feb 2024 18:23:40 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 6 +++--- ahserver/myTE.py | 2 +- ahserver/processorResource.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index 6739d05..00cd34b 100755 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -136,7 +136,7 @@ class TemplateProcessor(BaseProcessor): url = self.resource.entireUrl(request, path) ns = self.run_ns te = self.run_ns['tmpl_engine'] - print(f'{url=}, {path=}') + # print(f'{url=}, {path=}') # return await te.render(url,**ns) return await te.render(path,**ns) @@ -155,7 +155,7 @@ class TemplateProcessor(BaseProcessor): class BricksUIProcessor(TemplateProcessor): @classmethod def isMe(self,name): - print(f'{name=} is a bui') + # print(f'{name=} is a bui') return name=='bui' async def datahandle(self, request): @@ -215,7 +215,7 @@ class MarkdownProcessor(BaseProcessor): mdtxt) def getProcessor(name): - print(f'getProcessor({name})') + # print(f'getProcessor({name})') return _getProcessor(BaseProcessor, name) def _getProcessor(kclass,name): diff --git a/ahserver/myTE.py b/ahserver/myTE.py index d0c2af1..af7fcf9 100755 --- a/ahserver/myTE.py +++ b/ahserver/myTE.py @@ -18,7 +18,7 @@ class TmplLoader(BaseLoader, TmplUrl2File): coding = config.website.coding fp = self.url2file(template) - print(f'{template=} can not transfer to filename') + # print(f'{template=} can not transfer to filename') if not os.path.isfile(fp): raise TemplateNotFound(template) mtime = os.path.getmtime(fp) diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index aeaf235..39e85e4 100755 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -324,7 +324,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): if not config.website.allowListFolder: self.error('%s:not found' % str(request.url)) raise HTTPNotFound - print(f'{self.request_filename=}, {str(request.url)=} handle as a normal file') + # print(f'{self.request_filename=}, {str(request.url)=} handle as a normal file') return await super()._handle(request) def gethost(self, request): @@ -416,7 +416,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): async def path_call(self, request, path, params={}): url = self.entireUrl(request, path) - print(f'{path=}, after entireUrl(), {url=}') + # print(f'{path=}, after entireUrl(), {url=}') fpath = self.url2file(url) processor = self.url2processor(request, url, fpath) new_request = request.clone(rel_url=url)