From 13a2c58b98b738413c69590cf92dcb8bd0c7ad58 Mon Sep 17 00:00:00 2001 From: Joel Bradshaw Date: Mon, 17 Jan 2022 15:14:01 -0800 Subject: [PATCH] Use parameter-based formatting for debug --- bookwyrm/views/inbox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/views/inbox.py b/bookwyrm/views/inbox.py index 1d2c303b..756a5829 100644 --- a/bookwyrm/views/inbox.py +++ b/bookwyrm/views/inbox.py @@ -74,7 +74,7 @@ def raise_is_blocked_user_agent(request): return url = url.group() if models.FederatedServer.is_blocked(url): - logger.debug(f"{url} is blocked, denying request based on user agent") + logger.debug("%s is blocked, denying request based on user agent", url) raise PermissionDenied() @@ -89,11 +89,11 @@ def raise_is_blocked_activity(activity_json): # check if the user is banned/deleted existing = models.User.find_existing_by_remote_id(actor) if existing and existing.deleted: - logger.debug(f"{actor} is banned/deleted, denying request based on actor") + logger.debug("%s is banned/deleted, denying request based on actor", actor) raise PermissionDenied() if models.FederatedServer.is_blocked(actor): - logger.debug(f"{actor} is blocked, denying request based on actor") + logger.debug("%s is blocked, denying request based on actor", actor) raise PermissionDenied()