From 9d37384b705b8f9df0995081a3642d452dc86c8d Mon Sep 17 00:00:00 2001 From: joknarf Date: Wed, 4 Dec 2024 00:17:06 +0100 Subject: [PATCH] remove debug log messages --- pywebfs/pywebfs.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pywebfs/pywebfs.py b/pywebfs/pywebfs.py index a75f56c..8311b21 100644 --- a/pywebfs/pywebfs.py +++ b/pywebfs/pywebfs.py @@ -158,7 +158,6 @@ def find_files(self, search, path): for s in search.split(): try: rexp.append(re.compile(accent_re(s), re.IGNORECASE)) - self.log_message(accent_re(s)) except: err = 1 if err: @@ -216,12 +215,9 @@ def list_directory(self, path): def end_headers(self): is_file = "?" not in self.path and not self.path.endswith("/") - # is_file = False - # This part adds extra headers for some file types. - self.log_message(str(is_file)) + # adds extra headers for some file types. if is_file: mimetype = self.guess_type(self.path) - self.log_message(mimetype) if mimetype in ["text/plain"]: self.send_header("Content-Type", "text/plain") self.send_header("Content-Disposition", "inline") @@ -249,7 +245,6 @@ def do_GET(self): displaypath = urllib.parse.unquote(p.path) path = displaypath displaypath = html.escape(displaypath, quote=False) - self.log_message(path) title = f"{self.server.title} - {displaypath}" htmldoc = HTML htmldoc += f"{title}\n"