From 0345da6468351f73f15ae11640429d94b23a0a54 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Tue, 17 Jun 2025 20:00:03 +0300 Subject: [PATCH] handle ping endpoint logging better --- app/library/PackageInstaller.py | 2 -- app/main.py | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/library/PackageInstaller.py b/app/library/PackageInstaller.py index 2052f896..352e99ac 100644 --- a/app/library/PackageInstaller.py +++ b/app/library/PackageInstaller.py @@ -18,8 +18,6 @@ class Packages: if file.exists() and os.access(str(file), os.R_OK): with open(file) as f: from_file: list[str] = [pkg.strip() for pkg in f if pkg.strip()] - else: - LOG.error(f"pip packages file '{file}' doesn't exist or is not readable.") self.packages: list[str] = list(set(from_env + from_file)) self.upgrade = bool(upgrade) diff --git a/app/main.py b/app/main.py index 8152d024..afacd970 100644 --- a/app/main.py +++ b/app/main.py @@ -129,7 +129,9 @@ class Main: if self._config.access_log: from app.library.HttpAPI import LOG as HTTP_LOGGER - HTTP_LOGGER.addFilter(lambda record: f"GET {self._app.router['ping'].url_for()}" not in record.getMessage()) + HTTP_LOGGER.addFilter( + lambda record: f"GET {str(self._app.router['ping'].url_for()).rstrip('/')}" not in record.getMessage() + ) web.run_app( self._app,