Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Do not force string interpolation while logging

Adrián Chaves15b501c08981
diff --git a/scrapy/core/http2/protocol.py b/scrapy/core/http2/protocol.py
index 36a51b898..968bfce63 100644
--- a/scrapy/core/http2/protocol.py
+++ b/scrapy/core/http2/protocol.py
@@ -346,7 +346,7 @@ class H2ClientProtocol(Protocol, TimeoutMixin):
elif isinstance(event, SettingsAcknowledged):
self.settings_acknowledged(event)
elif isinstance(event, UnknownFrameReceived):
- logger.warning(f'Unknown frame received: {event.frame}')
+ logger.warning('Unknown frame received: %s', event.frame)
# Event handler functions starts here
def connection_terminated(self, event: ConnectionTerminated) -> None: